PreviousNext

Debug an application

    1. 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

    2. Open the BlackBerry® IDE.
    3. Add and set up a workspace for your application.
    4. Add your application to the workspace.
    5. 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.

    6. 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.
    7. In the BlackBerry Smartphone Simulator window, test the relevant sections of code.
    8. 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.

      · The output pane displays messages from the debugger.

    9. To resume debugging your application, on the Debug menu, click Continue.
    10. To stop debugging your application, in the BlackBerry Smartphone Simulator, on the File menu, click Quit.

      Note: During a debugging session, in the Edit window, point to a variable with your cursor to show the value of the variable. You can also select an expression and point to it with your cursor to show the value of the expression. To specify whether this value is displayed in hexadecimal or integer format, on the Edit menu, click Preferences. Click the Debug tab, and then select or clear the Display integer and long values as hex.

      To view several panes in the BlackBerry IDE at the same time, on the Edit menu, click Preferences. Click the Docking tab and then select Allow docking windows to float behind main window. The panes that you select to dock can float in a window outside of the BlackBerry IDE.

Related topic


   BlackBerry