Blackberry Debug: Debug an application running on a live BlackBerry smartphone

来源:互联网 发布:大学c语言必背基础知识 编辑:程序博客网 时间:2024/06/05 00:52

Summary

This article applies to the following:

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


Details

The debugging tool included in the BlackBerry JDEcan be used to debug applications running in the BlackBerry SmartphoneSimulator as well as on the BlackBerry smartphone.

Connecting the debugging tool to the BlackBerry smartphone

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

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

BlackBerry JDE

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

BlackBerry JDE Plug-in for Eclipse

  1. Connect t the BlackBerry smartphone to theUSB 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 DebugConfigurations.
  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 Attachto a specific device. With the latter options, if you have multipleBlackBerry smartphones connected, from the drop-down list you can specifywhich BlackBerry smartphone to use for debugging.
  10. Click Debug.

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

 

 

 

 

from:http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/How_To_-_Debug_an_application_running_on_a_live_BlackBerry_smartphone.html?nodeid=800768&vernum=0