Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Debug an application running on a live BlackBerry smartphone

by Retired ‎02-16-2010 11:13 AM - edited ‎02-18-2010 12:04 PM (3,609 Views)


This article applies to the following:

  • BlackBerry® Java® Development Environment (BlackBerry JDE)
  • BlackBerry® JDE Plug-in for Eclipse®
  • BlackBerry smartphones based on Java® technology


The debugging tool included in the BlackBerry JDE can be used to debug applications running in the BlackBerry Smartphone Simulator as well as on the BlackBerry smartphone.

Connecting the debugging tool to the BlackBerry smartphone

To connect the debugging tool to the BlackBerry smartphone with a serial connection, you must have the Java Communications application programming interface (API) installed on your computer. To connect the debugging tool to a BlackBerry smartphone with a USB connection, the BlackBerry smartphone USB driver must be installed.

After installing the appropriate software, complete the applicable procedure for the development environment you are using.

BlackBerry JDE

  1. Connect the BlackBerry smartphone to the computer.
  2. From the BlackBerry JDE menu, select Debug > Attach to > Device. Select the BlackBerry PIN or COM port to which the BlackBerry smartphone is connected.
  3. Set break points in the BlackBerry JDE and then start the application on the BlackBerry smartphone.
  4. Make sure that the application files running on the BlackBerry smartphone are identical to the application files running in the BlackBerry JDE.

BlackBerry JDE Plug-in for Eclipse

  1. Connect t the BlackBerry smartphone to the USB port on your computer.
  2. Open the BlackBerry® Device Manager.
  3. Load the application on to the BlackBerry smartphone.
  4. Set break points in your application
  5. In Eclipse®, on the Run menu, click Debug Configurations.
  6. Select BlackBerry Device.
  7. Click New.
  8. In the Name field, specify a name.
  9. In the BlackBerry Device configuration section, select either Attach to any connected or Attach to a specific device. With the latter options, if you have multiple BlackBerry smartphones connected, from the drop-down list you can specify which BlackBerry smartphone to use for debugging.
  10. Click Debug.

Note: If an error message appears immediately after selecting a communications port (COM port) from the list, the Java Communications API may not be correctly installed on your computer. Make sure you have placed the javax.comm.properties file in the correct location. For more information and alternative locations, see the Java Communications API installation instructions.

Users Online
Currently online: 9 members 2,355 guests
Please welcome our newest community members: