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
Developer
Posts: 46
Registered: ‎06-16-2009
My Device: Not Specified
Accepted Solution

Eclipse and Debugging

Hi All,

Sorry if this question has been asked a million times. I am new to Java, J2me and Blackberry programming.... I started off by using the JDE 4.2.1 and decided to move over to the eclipse plugin because of the JDE short comings (Code Formatting was a biggie for me)... Eclipse on the other hand is a bear to get configured. My question has to do with the debugger and debugging...

 

Either I have it set up wrong or debugging in Eclipse is miserable at best. Coming from C# and Visual Studio, I am used to the debugger throwing in the code and showing you exactly where the unhandled exception or error is. With my current configuration I get a white screen in the simulator with a vague description of the error... Can someone please point me in the right direction... I really need more precise debugging.

 

Thanks,

Paul

 

New Developer
Posts: 13
Registered: ‎09-15-2009
My Device: Not Specified

Re: Eclipse and Debugging

You have two factors. First, be sure that an exception or error is indeed happening. You could have just made an coding mistake that results in a white screen being displayed (failed to add components, for example). 

 

Debugging BlackBerry code is just debugging Java code in Eclipse, and it has at least as many debugging options as Visual Studio. You must enable the break on exception feature, among many other possible features. You can find instructions in the Eclipse help, under Java development user guide -> Tasks -> Running and Debugging

 

Of course, you will need to have the application in debug mode on the simulator, and instructions for this are under the Eclipse Help in BlacBerry JDE Plugin Guide. 

Highlighted
Developer
Posts: 80
Registered: ‎09-12-2009
My Device: Bold 9700
My Carrier: Vodafone UK

Re: Eclipse and Debugging

If you are getting a white screen in the simulator with a small message then it isn't properly in the debug mode; Current it is running without debugging!

 

If you want to debug make sure you choose debug or click on the little bug to debug, When your in debug mode, if it hits an exception it will show u the debug perspective and show you the code stack, the exact line the error occured and a list of the variables so that you can determine what is and isn't null, check if something is an expected value (i.e. true/false etc).

Genius Development Scotland
Website: http://www.genius-dev.co.uk
Developer
Developer
Posts: 46
Registered: ‎06-16-2009
My Device: Not Specified

Re: Eclipse and Debugging

That was it geeneeus..

I needed to click on the little bug...

 

It is sort of misleading. When you mouse over the green play button, the tooltip says Run Debug Server, when you mouse over the little bug it says Debug Debug Server... Too many bells and whistles!

 

Thank You!