Debugging is the process of methodically finding and fixing defects in your application. You typically perform debugging with a specialized debugger tool. Both Eclipse and NetBeans provide a debugger that you can use with MIDlets. You can debug a MIDlet in an emulator or on a device. On-device debugging (ODD) is an advanced and precise method for debugging MIDlets directly on a device. Series 40 and Symbian support roughly the same process for debugging in an emulator, but the process for on-device debugging is completely different in its setup phase.
To debug a MIDlet in an emulator, set up the IDE and run the debugger. After the IDE has launched the debugger and the MIDlet is running in the emulator, use the IDE for debugging the MIDlet.
On-device debugging is supported on selected Series 40 6th Edition and newer devices.
To debug a MIDlet on a Series 40 device:
Download the Series 40 On-Device Debugger.
Setup the debugger and integrate it with the IDE you use for debugging.
Connect the debugger to the Series 40 device.
Debug the MIDlet using the IDE. You can also retrieve tracing data from the MIDlet.
For detailed instructions, see the Series 40 On-Device Debugger User Guide provided with the debugger.
On-device debugging is supported from S60 3rd Edition FP2 onwards. S60 5th Edition and S60 3rd Edition FP2 support ODD over WLAN. From Symbian^3 onwards, Symbian devices support ODD over Bluetooth, USB, and WLAN.
Note: Make sure to use the correct SDK release for the device. The SDK platform must support the same Java Runtime for Symbian version as the device. For example, if you want to debug the MIDlet on a device with Java Runtime 2.1 or 2.2 for Symbian, use a Symbian^3 SDK, or if you want to debug the MIDlet on an S60 3rd Edition FP2 device, use an S60 3rd Edition FP2 SDK.
To debug a MIDlet on a Symbian device:
After the IDE has launched the debugger and the MIDlet is running on the device, use the IDE for debugging the MIDlet.
The following figure shows the ODD setup for Symbian^3 devices.
Figure: ODD setup for Symbian^3 devices
For detailed instructions on debugging a MIDlet from Eclipse or NetBeans over a WLAN connection, see article How to configure Java ODD over WLAN with Eclipse and NetBeans IDEs in the Nokia Developer Wiki.