Troubleshooting guide

249
17: Testing applications
Install .debug files on your computer
To debug applications using a BlackBerry® device, the .debug files in the BlackBerry Integrated Development
Environment must match the software version number of the BlackBerry device. BlackBerry device simulator
packages contain .debug files for specific BlackBerry devices.
1. Download the BlackBerry device simulator package for your BlackBerry device software version number from
the BlackBerry Developer Zone at:
http://blackberry.com/developers/downloads/simulators
2. Connect a BlackBerry device to the computer. See “Connect the BlackBerry IDE to a BlackBerry device” on
page 246 for more information about connecting a BlackBerry device to a computer.
3. In the BlackBerry IDE, on the Edit menu, click Preferences.
4. Click the Debug tab.
5. Click the Other tab.
6. In the Handheld debug file location field, type the location of the downloaded .debug files. The .debug files
exist in the Debug directory of the BlackBerry device simulator package installation directory.
Load applications on 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 Java™ Development Environment bin folder.
4. Type the following command:
JavaLoader [-usb] [-pport] [-bbps] [-wpassword] load file
Connect the BlackBerry IDE to a BlackBerry device
Perform one of the following tasks:
Parameter Description
port
The serial port to which the BlackBerry device connects (default is COM1), or a BlackBerry device PIN if the
BlackBerry device connects to a USB port. You must also specify the -usb option.
bps
The bit rate speed to the serial port (default is 115200).
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: BlackBerry device users should use the BlackBerry Desktop Software to load applications onto their BlackBerry devices.
Task Steps
Connect to a BlackBerry® device that uses a
serial port connection.
On the Debug menu, click Attach to > Handheld > COM <n>, where <n> is the serial port to
which your BlackBerry device connects.
Connect 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.