What is Snapdragon Debugger for Visual Studio?
Snapdragon Debugger for Visual Studio is a plug-in tool to Microsoft’s Visual Studio IDE that enables variety of APIs debugging for today’s Snapdragon- powered devices.
Currently this tool can be used for creating and debugging Android NDK applications from within the Microsoft Visual Studio environment. It is only available to debug native C/C++ code. Debugging Java code is not supported.
What are the system requirements?
Please see the Snapdragon Debugger for Visual Studio Quick Start Guide for system requirements.
Does Snapdragon Debugger also work on non-Snapdragon devices?
Yes, although we do not guarantee the same complete functionality, the tool for Android NDK application debugging should work on other non-Snapdragon devices.
Setup and Installation
What is the installation procedure?
Run the installer executable on your Host PC. The installer will walk you through the required steps, and prompt you for any dependencies that it cannot find.
It is recommended to run the installer with administrator privileges.
Where does the tool install to?
The tool will install to C:\Program Files (x86)\Qualcomm\QCDebugger
Will installing this tool modify my environmental variables at all?
Yes, there will be new environmental variables added if they do not already exist, and additions to your PATH environmental variables.
If this concerns you, it is advised to back-up your PATH before installing.
What debugging features are supported?
Snapdragon Debugger for Visual Studio supports the following features:
- Breakpoints, conditional breakpoints
- Single stepping through native and/or assembly code
- Call stack tracing
- Memory viewing/modification
- Register viewing/modification
- Local and global variable viewing/modification
- Crash log loading and examination
Can multithreaded applications be debugged?
Yes, there is multithreaded application support.
Can shared libraries compiled by third parties be debugged?
Yes, although you will need to provide the symbols and source code.
Can Android Applications that were not compiled with the tool be debugged?
Yes. The version 1.1 of the tool now lets you debug applications that were compiled outside of this particular debugger tool.
Can Snapdragon Debugger help me with post-mortem crash debugging?
Yes, as long as you have the logcat or tombstone file and the non-stripped symbol files for the application.
After updating the Android SDK Tools, Android NDK projects show a build error in Visual Studio “No suitable Java found”.
An Android file has been updated which needs to be re-patched by the Debugger installer. Please run the installer again to uninstall the tool and reinstall it.
When I try to “Attach To Process”, I get an error message saying “Debugger Failed to attach…Open or Select the correct project solution for process selected”.
Please be sure to highlight the application that you are trying to attach to in the Solution Explorer of Microsoft Visual Studio.
Currently, you cannot attach to an application that doesn’t have its source loaded and compiled through Snapdragon Debugger for Visual Studio.
I'm seeing an error when building a project saying that “The system cannot execute the specified program.” When trying to execute "ant.bat debug".
Your JAVA_HOME points to a 64-bit Java JDK. The tool requires 32-Bit JDK.
Debugger won’t stop at any breakpoints in external .so libraries that are linked into my applications.
The symbols for these files probably aren’t being loaded properly.
Developer Use Cases
I would like to debug an external .so that my application is linked to, but isn't compiled in my Visual Studio project.
You need to make sure that the non-stripped .so file for that library is copied into the <project path>/obj/local/armeabi-v7a/ directory of your APK. This is where the debugger looks for .so files to load symbols. You can find that non-stripped .so file in <other project path>/obj/local/armeabi-v7a/<other project name>.so. It is not the smaller .so file located in <other project path>/libs/armeabi-v7a/<other project name>.so...this is the stripped version
My application crashed and I’d like help examining the crash logs.
You can load the logcat or tombstone file into the debugger engine. Select Tools→Analyse Android Crash Log and use your logcat or tombstone file as the “Log File”. As the “Symbol Location”, use <application root>/obj/local/<platform>/