How to setup a cmake project with cuda debugging support in vscode - Ubuntu 20.04, Nvidia RTX 2080 Max Q, driver 470, cuda toolkit 11.5


After several attempts, I still cannot get cmake+cuda+cuda-gdb to work in vscode.
I have installed C++ plugin as well as the Nsight Code plugin.
The breakpoint never hits inside the cuda kernel.

It would really help if you could share a demo project with this this setup.
I have seen the samples, but I do not want to use Makefiles and need to really understand what is really needed to get it working.

Attached is one of the many setups and configs I have attempted.
cuda-xx1.7z (631.6 KB)

Best Regards

Thanks for your submission, Sambit. I have filed an issue against our Visual Studio Code support to investigate your issues with CMake. My team has recently increased its staffing for Visual Studio Code support, and I will ensure that this use case gets reviewed within the next thirty days.