PreviousNext

Debug on a BlackBerry device

You can run applications on a BlackBerry device that is inserted in the cradle and use the BlackBerry® IDE debugging tools to perform testing and optimization.

System requirements

To connect the BlackBerry® IDE to a BlackBerry device using a USB port, install BlackBerry® Desktop Software version 3.5.1 or later.

Install .debug files on your computer

To debug applications using a BlackBerry® device, the .debug files in the BlackBerry® Java Development Environment must match the software build version of the BlackBerry device.

    1. From the BlackBerry Developer Zone (www.blackberry.com/developer), download the .debug files for the version of device software that is running on the BlackBerry device.
    2. Copy the files to a folder on your computer.
    3. Specify the location of the .debug files to the BlackBerry IDE. See "Set options related to debugging on a BlackBerry device" for more information.

Load applications onto a BlackBerry device

For development and testing purposes, use JavaLoader.exe to load applications onto the BlackBerry® device.

    1. Exit the BlackBerry® Desktop Software.
    2. Connect the BlackBerry device to the computer.
    3. At a command prompt, switch to the BlackBerry JDE bin folder.
    4. Type the following command:

      JavaLoader [-usb] [-pport] [-bbps] [-wpassword] load file
      Parameter
      Description

      port

      A BlackBerry device PIN if the BlackBerry device is connected to a USB port (you must also specify the -usb option).

      password

      If a password is set, the password for the BlackBerry device.

      file

      Specifies one or more .cod files to load onto the BlackBerry device.

      Note: Users should use the BlackBerry Desktop Software to load applications onto their BlackBerry device. See the BlackBerry Java Development Environment Fundamentals Guide for more information.

Connect the BlackBerry IDE to a BlackBerry device that uses a USB port connection

> On the Debug menu, click Attach to > Handheld > USB (PIN), where PIN is the PIN of the BlackBerry® device:

You can now run your applications on the BlackBerry device and use the BlackBerry IDE debugging tools to test and optimize your application.

Connect the BlackBerry IDE to the BlackBerry Smartphone Simulator

> On the Debug menu, click Attach to > Simulator.

Note: See the BlackBerry Java Development Environment Fundamentals Guide for information on connecting a BlackBerry® Smartphone Simulator to a BlackBerry® Enterprise Server.

Related topic


   BlackBerry