## On-device Debugging

The on-device debug agent (Application TRK or System TRK) is a program that enables on-device debugging of phone prototypes, reference boards, and retail phones. An on-device debug agent is a program that is installed on a phone or reference board. It communicates with the debugger using a serial-over-Bluetooth or serial-over-USB connection. Through this serial communication, the on-device debug agent acts as the interface between the Carbide.c++ debugger and the target device. An on-device debug agent provides:

- Debug agent running on Symbian OS
- Provides a stable & integrated interface to Symbian OS
- Used to debug applications on actual devices
- Can be built-in to the OS image or installed as a .sis file

Using the on-device debug agent, one can use the Carbide.c++ IDE to debug programs running on phone hardware, making the debugging process much easier. The on-device debug agent works on all S60 3rd Edition devices, UIQ 3rd Edition devices, and Symbian TechView devkits.

The Application TRK debug agents are stored online and can be downloaded and installed using the On-Device Connections > New Connection Wizard > Install remote agents pane.

Some of the key benefits to using an on-device debug agent include:

- Easy debugging via serial interface (Bluetooth, USB, IrDA, etc)
- More accurate than emulator debugging
- Can often avoid using expensive hardware debuggers

There are two variations of the on-device debug agent, they are:

- Application TRK—supports application debugging only and available to developers creating applications for devices. Developers do not have access to system level routines, system ROM, other user application code, cannot modify the LR and SR registers, and must use a SIS file to debug an application.
- System TRK— supports both application and limited ROM debugging (includes application executables and limited ROM based components (i.e. no device drivers) and available to original equipment manufacturers (OEM) for device creation and customization

NOTE The type of on-device debug agent you have is based upon which Carbide.c++ product you have licensed. System TRK is only available with the Professional or OEM version of the product.

##### Related tasks

- On-device Debugging Overview