Carbide.c++ On-device Debugging Quick Start
This tutorial is for new Symbian C++ developers who want to use Carbide.c++ to debug on a production phone.
The emulator can be used for most of your debugging work. However, some situations still require debugging on a real device – for example, when you want to use hardware that isn't supported by the emulator (e.g. the camera or the acceleration sensor). In addition, some defects only show up on real hardware - e.g. those related to the hard memory constraints and speed differences. There is list of differences between the emulator and hardware in the SDK documentation here: » Symbian OS Tools And Utilities » Emulator » Emulator guide » Emulator/native platform differences.
Carbide.c++ and Target Configuration1. Make sure that the Phone Debug build configuration is activated:
3. The first time you are using on-target debugging, Carbide.c++ automatically generates a debug configuration. A wizard guides you through setting up the connection on your phone.
- In the first step, choose the default Application TRK Launch Configuration:
- In the following New Connection page, click on New to set up a new on-device debug connection to your phone. Enter a connection name for the phone that you want to use for debugging, and select whether to use USB or Bluetooth. In this example, we’re going to use USB, so make sure that the phone is connected to the PC via the USB cable (setting up a Bluetooth connection is similar to this process).
- The next step, called USB Settings, allows you to configure and test the connection. A remote agent must first be installed on the device to establish the debug connection between your phone and the device.
- Switch to the Install remote agents tab and select the appropriate remote agent for your version of S60 – in this case, 5.0.0 for S60 5th Edition.
- After you have installed the debug agent on the phone, start it from the Application folder of the phone menu. Make sure that the status message from the App TRK application tells you that its status is Connected. You can switch between USB and Bluetooth mode by using the options menu. By default, Bluetooth is activated, so the application asks you to set up a Bluetooth connection when you first start it. If you want to use USB, cancel this request, go to the settings and switch to USB.
- Now, you should be able to see and select your device from the Serial Port drop-down list. On your PC, the COM port number is likely to be different to the one shown in the screenshot.
- Next, select the device OS – again, S60 5.0.0 corresponds to Symbian^1 SDK. Click on Initiate service testing to see if the connection is working. If successful, you should see the status message:
- Click on Next to save your new connection settings. You will then jump back in the previous wizard.
4. Continue to the TRK SIS Selection dialog. If no .sisx file is defined in the SIS File to Install box, click on the dialog's Modify SIS builder settings for build configuration... link to define a new SIS builder configuration (as described in Building a SIS File in Carbide.c++).
5. Click on Finish to start debugging! The application is now built; the resulting .sisx file is silently installed on the phone and launched immediately afterwards. You can set breakpoints in Carbide.c++, debug your application and view memory regions just as when developing on the local PC.
This tutorial explained how you configure your phone and Carbide.c++ for on-device debugging.