-
Notifications
You must be signed in to change notification settings - Fork 3
Debug Project
Debugging application is as natural as for any other project, that could be created inside Visual Studio.
#Start application with debugger It might be done by pressing F5, using respective command from Debug menu or using the toolbar:

It will build the selected project if necessary and upload the BAR file (or only changed part, if target device supports it and this option is enabled in project settings).
#Attach to process Alternatively, you can attach to already running process on the device. From the Debug menu choose Attach to Process... command. Next, on the appeared dialog, select BlackBerry Native Debugger as the transportation layer. Qualifier will be automatically populated with devices and simulators defined at Environment Setup. Once the connection with the device is established the Available Processes list will show all running applications user has access to, ie. all not signed.
Note that you can't attach to the qconn process.
The list displays PIDs, path to the binary (with '/accounts/1000/appdata' removed) and architecture type (ARMv7 for device, while x86 for simulator).

Or click the Find... button to be able to specify details of the device to connect to directly:

GDB requires a local copy of the binary that is running on the target to be able to setup breakpoints etc. The plugin has a build-in mechanism to detect, where the binaries from currently opened projects could be produced. However, if it can't find it, you will be asked to specify the path, before the real attaching is done.
#Debugging the application
Once first or second way described above is done, Visaul Studio will switch into debugging mode, again the same way as it does for any other type of projects. You can:
- setup breakpoints there,
- step through the code,
- view values of local variables (by 'Watch' window or simply hovering)
- view threads (and navigate over the callstack)


There is a known issue with Cascades project, that you may need to have 'Threads' window opened, to avoid seeing Frame not in module error instead of location in code, while breakpoint is hit.
You can specify breakpoints anywhere - it can be even first instruction inside your main() function.