Debug an application
- Copy the application .cod, .csl, .cso, .debug, and .jar files into the BlackBerry® Smartphone Simulator root directory:
C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\simulator
- Open the BlackBerry® IDE.
- Add and set up a workspace for your application.
- Add your application to the workspace.
- Start any BlackBerry Smartphone Simulators that your application requires.
Without access to a BlackBerry® Enterprise Server, you need the BlackBerry® MDS Simulator to simulate browser traffic, http and tcp connections to third-party applications, and push functionality. To debug applications that send and receive messages between a BlackBerry Smartphone Simulator and a computer email application, use the BlackBerry email server simulator. See the BlackBerry Smartphone Simulator Guide for more information about the BlackBerry MDS Simulator, the BlackBerry Smartphone Simulator, and the BlackBerry email server simulator.
- On the Debug menu, click Go. The BlackBerry IDE builds all active projects in the workspace and loads the applications in the BlackBerry Smartphone Simulator.
- In the BlackBerry Smartphone Simulator window, test the relevant sections of code.
- On the Debug menu, click Break Now.
· The breakpoints pane displays the section of code and the line number the application pauses at.
· The edit pane displays the source code, with an arrow to indicate the line of code at which the application pauses at.
- To resume debugging your application, on the Debug menu, click Continue.
- To stop debugging your application, in the BlackBerry Smartphone Simulator, on the File menu, click Quit.
Related topic