09-15-2009 12:56 PM
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.
Solved! Go to Solution.
09-15-2009 02:04 PM
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.
09-15-2009 02:45 PM
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).
09-17-2009 01:43 PM
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!