This procedure describes on-device debugging on a Windows Mobile device connected to a host running Windows. Before starting this procedure ensure your environment is properly configured, as follows:
Integrate the device as described in CLDC Emulator Installation for a Device Running Windows Mobile.
Confirm the device is connected and that it appears in the Device Selector window.
If the output console is not visible, select Window > Output > Output to open it.
If the project you want to debug is not main, right-click and select Set as Main Project.
In the project Properties window, select the Platform category and set the device to match the device that has the CLDC emulator installed.
Only one debug process can run on a port. In the device selector, right-click on a device and look for the Debug Port property. By default the port number is 51307. If you are debugging on 51307 and you wish to debug an additional project, you must run on a different device and change its port number property.
This procedure features command line debugging, but you can use a graphical debugger in a similar fashion.
The first time you debug you see this dialog:
If you suppress this dialog you can still get the port number from the Output window. Look for the message “Starting emulator with port number port-number”.
The application is now deployed and started on the connected device. You are ready to attach a debugger.