Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
misty83
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

why System.out.println does not work?

hi,

when i'm writing app i would like to test some of the functionalities on the simulator. sometimes i need to print smth to know in which part of program i'm or for some other reasons. i do not want to use alerts!!! so i simply try to use

System.out.println("test"); but it does not work, i mean it does not appear on the output console. it is strange cause when i try it for midlet for s40 it works and text is printed..

 

how can i make it work also for bb simulator?

 

 regards

Please use plain text.
Developer
sahil_khanna
Posts: 112
Registered: ‎07-19-2009
My Device: Not Specified

Re: why System.out.println does not work?

Mark a breakpoint on System.out.println and then see what happens..

Please use plain text.
Developer
misty83
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

Re: why System.out.println does not work?

nothing happens.. (i've started using netbeans and maybe i use the debugger wrong). but i remeber when using eclipse System.out.println.. did not also work. does it work for You?

 

 regards

Please use plain text.
Developer
Ekansh
Posts: 468
Registered: ‎08-07-2009
My Device: Curve, Bold, Storm
My Carrier: Blackberry Developer

Re: why System.out.println does not work?

The text you are displaying is very small.

Simulator might be printing but you are not able to see it.

 

Display a long string.

 

System.out.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXPrint");

 

and mark a breakpoint.

 

and then run the application.

It will display 

----------------------------------------------------------
feel free to press the kudos button on the left side to thank the user that helped you.
please mark posts as solved if you found a solution.
Please use plain text.
Developer
misty83
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

Re: why System.out.println does not work?

it really does show nothing! i set on this line "toogle line breakpoint" i've set a long text:

 

System.out.println("this is only a testxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");

 

but nothing happens,nothing shows up when i run simulator..

Please use plain text.
Developer
ydaraishy
Posts: 562
Registered: ‎09-30-2009
My Device: Not Specified

Re: why System.out.println does not work?

Are you getting any other output on the debug console?

 

Have you tried using System.err?

Please use plain text.
Contributor
randolphvalencia
Posts: 11
Registered: ‎06-21-2011
My Device: Bold
My Carrier: Smart

Re: why System.out.println does not work?

I have the sample problem. System.out.println is not showing. Please advice

Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: why System.out.println does not work?

I have never had this problem on a Simulator.  Recompile and restart your Simulator, put a break point immediately after the System.out.println, and check the debug window.

Please use plain text.