Unable to hit breakpoints in kernel functions

Hello,

I’m using VS Community 2017-version 15, and NSight Visual Studio Edition 2020.1. I have a GeForce GTX 1080 running GPU driver version 452.06 on Win10 Pro. I am also using the Cuda toolkit 11.

I am going to do local Next-Gen debugging.

The debugger starts the process, but breakpoints in the kernel function cannot be hit. Please consider the following figure.

I have also tried to do this in another system with four Geforce RTX 2070 GPUs. And, I have also tried to debug a simple code, like the sample code (MatrixMult). There is still the same problem.

That would be great if someone can help,

Thanks in advance.

Common issues with not hitting breakpoints (besides the ones mentioned in the tool tip you’re showing).

  • Code not compiled with the nvcc -G flag
  • Source of of sync

Note that at runtime, the breakpoint cannot be resolved until the kernel is loaded, so it will appear unresolved until the kernel loads, and it should hit as expected.

If you still have trouble, try using a function breakpoint and see if that hits.

Many thanks for your response. As you mentioned, I have added the following line to my main CMake file. However, it did not work!

set(CUDA_NVCC_FLAGS_DEBUG “-g -G”)