Debugging applications

MTJ uses Eclipse's built-in debug function in debugging the Java ME applications. In order to successfully debug your applications, you need to edit some of the Eclipse's debug settings.
To edit the debug settings
  1. In the menu bar, select Window -> Preferences.
    The Preferences window opens.
  2. In the left-side pane, select Java -> Debug.
    The Debug pane opens on the right side.
  3. In the Suspend Execution field, uncheck all the suspend options.
  4. In the Communication field:

Note: The values can be greater than 20000, depending on the speed of your computer. If the values are too small, MTJ might freeze when you try to debug your applications.

  1. Click OK.

To debug an application

As a prerequisite for debugging, insert breakpoints into your code before debugging and confirm that you have edited the debugging settings from the Preferences dialog.

  1. In Package Explorer, highlight the desired project.

  2. In the menu bar, select Run -> Debug.
    The Debug window opens.

  3. In the Configurations field, click New.
    New configuration (1)
    appears under MTJ Application

  4. On the right-side pane , you can:

  5. Select Debug.
    The bugs are listed in the Debug perspective.


Mobile Tools for the Java Platform

Applications


Managing applications


Wizards