Freitag, 4. Juni 2010

Uncaught Exceptions and the BlackBerry Whitescreen

Most BlackBerry developer experiences an uncaught excecption at some point.
Very oftens it's a RuntimeException the developer did not expect.


What's the best way to find it?

The default behaviour is to choose "continue" and search for the problem in the code.
This could be done by looking into the EventLog where uncaught exception will be logged with full stack trace (see also

But did you ever scroll through all the options?
There is "attach debugger" which is the easiest way to find the problem when this happens in the simulator.


Simply connect your Eclipse via "Debug As" -> "Remote Java application" to default port 8000. Afterwards(!) click "attach debugger" on the simulator.


Voilà! :)

You will be directly sent to the codeline where the exception occurs with full stack trace available, you can check all the variables. Finding an exception was never easier

Keine Kommentare:

Kommentar veröffentlichen