Starting GDB debugger - Failed to attach

I built my application outside of Visual Studio, but am attempting to use Nsight Tegra to debug it.

When I start debugging all the steps succeed (Deploying application, Launching application, Starting GDB server, Starting Java debugger) until I reach Starting GDB debugger which give me the following error:

Failed to attach: Remote communication error. Target disconnected.: No error…

In the output window I see:
Device API level: 17.
Android: Setting ports…
Android: Starting GDB server on device…
Android: Starting C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Android\gdb.exe …
gdb.setup file was not found, initialization is skipped.
Android: Loading C:\Users\xxxxx\AppData\Local\Temp\Android\015d2a4ffa5c0018\system/bin/app_process …
Android: Connecting to remote device…

On my android device, sometimes the application will crash (no debug info), and sometimes the application is still “Waiting for debugger.”

Any thoughts on how I might be able to discover the problem?

This may have been caused by the fact that I was using the gdbserver bundled with DS-5. I’m having more success with the ones provided with the AndroidNDK…

great! let us know how it goes!

Better? But not great.

https://devtalk.nvidia.com/default/topic/546161/nsight-tegra-visual-studio-edition/program-failed-to-execute/