Build and debug

Before you test your application on a simulator or device, you must set the target device. If you are testing on a physical device, you must either sign your application or configure your environment to use a debug token, and install the debug token on the device.

When you build your application, make sure you build it using the solution platform (BlackBerry or BlackBerry Simulator) that corresponds to the target device.

Before you build your BlackBerry application, check your project properties to ensure that you've included the appropriate dependencies and that the output paths match those defined in the bar-descriptor.xml file.

When you are ready, you can:

Run your application on a target

Before you can run your application on a target,

  • Ensure that your device is in Development Mode (the simulator is already in Development Mode)
  • Ensure that your application builds successfully using one of the BlackBerry configurations
  • Set the IP address and password for the BlackBerry device or simulator
  • Ensure that BlackBerry Link is installed

  1. If your target is a BlackBerry device, ensure that it is connected to your computer.
  2. In Microsoft Visual Studio, from the Debug menu, select Start Debugging.

Build and deploy your app

When you use the BlackBerry Native Plug-in for Microsoft Visual Studio, you have several choices for a target device. You can use a BlackBerry 10 device, a BlackBerry 10 Simulator, a BlackBerry PlayBook tablet, or a BlackBerry Tablet Simulator.

Debug configuration

When you build your application using the Debug configuration, your code is compiled but not packaged into a BAR file.

  1. On the Build menu, select Configuration Manager.
  2. In the Configuration Manager window, in the Active solution platform drop-down list, select Debug.

When you run your application using the Debug configuration, your code is compiled, packaged into a BAR file, and deployed to your selected target device as configured by your settings in the BlackBerry Solution target.

Release configuration

When you build your application using the Release configuration, your code is compiled and packaged into a BAR file. This option does not deploy your application.

  1. On the Build menu, select Configuration Manager.
  2. In the Configuration Manager window, in the Active solution platform drop-down list, select Release.

Debug your app

To run or debug your program, you need to have both a BlackBerry 10 OS Target project which specifies how Microsoft Visual Studio communicates with your target and a launch configuration which describes how the program runs on your target. You only need to set this up once for that particular program.

Test your unsigned app on a device

If you want to test an unsigned application on a device, you must create and install a debug token on the device and configure the bar-descriptor.xml file.