Can not break into Cuda for debugging

I have a cuda program that is written in Cuda Driver API, and compiled into ptx and loaded in runtime. I could run it without the nsight debugger ok. But when I run with cuda debugger (nsight visual studio), I can’t stop in any breakpoint or function. The screen flashed with some output that I can’t see and then exit. It is supposed to write to an output file but it did not.

I am wondering how I can:

  • see the output
  • set breakpoint. I double checked the compile command and it does have -G there.