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
- In the menu bar,
select Window -> Preferences.
The Preferences window opens.
- In the left-side
pane, select Java -> Debug.
The Debug pane opens on the right side.
- In the Suspend
Execution field, uncheck all
the suspend options.
- In the Communication field:
- In the Debugger
timeout (ms) field, set the
value to 20000 or greater.
- In the Launch
timeout (ms) field, confirm
that the value is set to 20000 or greater

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.
- 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.
In Package Explorer, highlight the desired project.
In the menu bar, select Run
-> Debug.
The Debug window opens.

In the Configurations field, click New.
New configuration (1) appears under MTJ Application
On the right-side
pane , you can:
- In the Name
field, enter a new name for the run configuration.
- In the Executable
tab, you can define the project and executable file.
- In the Target
Device tab, you can replace the
default target device and JRE..
- Select Debug.
The bugs are listed in the Debug perspective.

Mobile Tools for the Java Platform
Applications

Managing applications

Wizards