Issues adding breakpoint to files that are not within the jni folder

I am using the nsight tools to compile my own custom C++ framework using the native-app template. Everything compiles and runs okay but I seem to only be able to add breakpoints into my c++ code when the source files are within the jni folder. My cross-platform framework source files are situated in various folder above my android project folder and I don’t want to have to mirror these within the jni folder, just so I can add breakpoints. I have tested moving a few files from the framework into the jni folder and I am able to add breakpoints without any issues. The breakpoints that I add into the problematic source files turn white (disabled) with a warning triangle that when hovered over says “The breakpoint will not currently be hit. The module containing the breakpoint location is not loaded”. Note: All my source code is within the same project in my solution.

Any help would be greatly appreciated.

Cheers

Nigel

System Spec: Win 8 64bit, VS2010 V 10.0.30319.1 RTMRel
??? Should this be SP1?

Updated VS2012 to 10.0.40219.1 SP1Rel and issues still occur

Ping!

Hello Nigel,

Please check your project configuration type (located under Project Properties, General section). If it is “Make Application (ndk-build → .apk)” then it is possible and you will need to modify your .mk file to properly add the sources to make all things work. If it says “Application (.so → .apk)”, read on.

You will need to check if your files are #included without “.” and “…” paths, i.e. your breakpoints will not be hit if you have includes like the one below:
#include “…\header.h”
It is a GDB limitation, so you will have to fix the #includes to make breakpoints work.

If the described above is not the case, then please post the contents of your gdb.setup file that is generated after a successful build. It is located under libs// folder in your project folder.

It will also help if you will turn the logging on (in VS Tools → Options → Android → Debug → Log debugger commands) and attach (or list in the post) the Android.log file that is located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\NVIDIA\Nsight Tegra\1.0\ folder.

You can also try to move the project to path without spaces.

Please let me know it this info will be of any help, or provide the requested files so we could research your issue.

Best regards,
Dmitry

For some reason changing my post does not work here. Just wanted to clarify something about the Android.log:
You will need to set a breakpoint (that is not hitting for you) and start a debug session. After that the log file will contain some valuable info for understanding the source of your issue.