Debugging cuda code using visual studio

I’ve read this thread and applied all the suggested solutions but the execution still refuses to pause inside a global function, though pausing within a host function within the same .cu file…

VS makes any breadpoint inside my global function inactive once I press F5 and says:

“The breakpoint will not currently be hit. No executable code is assosiated with this line
Possible causes include: preprocessor directives and compiler/linker optimizations.”

I’ve disabled all optimizations, both in VC++ and NVCC compilers, the linker doesn’t seem to be relevant to this…
Of course, I have the -deviceemu activated in EmuDebug, and ‘Generate debug information’ set ‘-D_DEBUG -D_WIN32’

The only NVCC compilation type that builds is 'Generate object hybrid file (–compile / -c), other settings here either return a CUDA build rule error or even cause the linker to crash… Maybe this is relevant to the inactive kernel breakpoints?

Thank you!

Exactly the same problem for me. /O2 option should NOT be enabled for debug mode…

Can we do CUDA programming on Quadro NVS 285? It does not have CUDA cores, but can we install driver and program?

My apologies for differnt question here, but no one seems to be responding if I create a new thread for the same.

PS: I only have Quadro NVS 285, Is there any other option that wont cost me a lot?

Hi Shodan,

Can you tell me how did you resolve this ? Were you able to debug. Can you please point out to me the steps in which you might have, it will be really helpful.

Regards,

Shyam B