Debug your device application by setting breakpoints and stepping through code.
-
From the BlackBerry JDE, select to build and execute the application, and launch the simulator.
You can view build results in the JDE output window.
-
Add breakpoints to the code:
-
Place your cursor in the code where you want to add a breakpoint and select .
-
You can also set breakpoints for a given event from the same menu, for example, On startup, When an exception is thrown, Before garbage collection, and so on.
-
Run the application from the simulator. The application stops based upon the breakpoint you set.
-
Once stopped, you can step through the code using any of the step icons (step over, step into, step out, and so on) located in the JDE toolbar:
For more information about the various views available for debugging, including determining memory usage, code coverage, and so on, refer to the BlackBerry JDE documentation. To view a video on how to debug your BlackBerry device application in the BlackBerry JDE, go to http://www.blackberry.com/DevMediaLibrary/view.do?name=debug.