Nsight VS Code Edition + Remote-SSH + Jetson Nano: cuda-gdb doesn't work because it needs root

Topic says it all.

The extension doesn’t start cuda-gdb as root, so when you reach any CUDA code, you get this:

fatal: The CUDA driver initialization failed. (error code = CUDBG_ERROR_INITIALIZATION_FAILURE(0x14)

I tried to create a script that runs cuda-gdb as root on the Nano, and then added an entry on the sudoers file so that no password is required. Unfortunately, the extension appears to ignore the standard “miDebuggerPath” property in the launch.json, which is accepted by the regular C/C++ extension.

Some kind of option needs to be offered to run cuda-gdb as root, otherwise this will be completely useless for the Jetson Nano

Jetson Nano is not technically supported yet, we will be looking at this more soon. If you want to try the script approach use debuggerPath instead of miDebuggerPath.

1 Like

Thanks, using “debuggerPath” has allowed me to run the debugger. However, there are many remaining issues (showing variables, changing focus, etc.) so that it’s not really usable.

I do hope NVIDIA looks into supporting the Jetson Nano. VS Code is my main development environment and I do a lot of work on the Nano, so it would be a huge boost to my workflow. Thanks.

EDIT: I take that back (the part about having other issues), it was a simple question of adding the -G/--device-debug compile flag. It’s now working smoothly. Thank you very much! I’ll mark it as a solution.