Can't debug in VS Code with Nsight VS Code

I am trying to debug cuda program which in running in a remote GPU-server,

  1. I did everything in the GPU-server including CUDA-toolkit(Compiling, debugging is available in GPU-Server.),

  2. I install Nsight Studio Code Edition extension in my local computer with VS-Code.

  3. I could compile *.cu remotely in my local PC through configure “preLaunchTask”.

My problem is that when I start to debug the cuda executable file compiled by the “preLaunchTask” , the process is stuck without any error reporting. (the left running bar is strolling consistently…)

What can I do to debug cuda program remotely? Thanks!

If you are trying to debug via cuda-gdbserver, this is not supported for now but we are planning to add it in a future release. In the meantime though you can do remote debugging via the Remote-SSH extension.

I am using the Remote SSH but still cannot debug or run without debug. The indicator keeps showing, no output in the debug console.

I can run and debug successfully after the following steps:

  1. Adding CUDA path to PATH variable in the remote server.
export PATH="/usr/local/cuda/bin:$PATH"
  1. Ctrl + Shift + P and execute Remote-SSH: Kill VS Code Server on Host…

Thanks for updating the post with the solution.
I shall close this thread.
If you do have any additional questions please start a new topic - thanks !