NVIDIA / nsight-vscode-edition

A Visual Studio Code extension for building and debugging CUDA applications.
Other
68 stars 11 forks source link

Cannot instantiate printer for default visualizer #2

Closed sbobko closed 1 year ago

sbobko commented 3 years ago

When I try to debug CUDA, I get this message: image Updating VSCode and reinstalling the extension did not solve the problem. it is also not possible to view local variables and use other debugging features related to the contents of variables. Extras: "configurations": [ { "name": "CUDA C++: Launch", "type": "cuda-gdb", "request": "launch", "program": "NVIDIA_CUDA-11.3_Samples/bin/x86_64/linux/debug/matrixMul" }

sbobko commented 3 years ago

@PooyaZv ; @eltonwells I tried to solve the problem on my own but apparently it hides deeper than I can find :)

eltonwells commented 3 years ago

@sbobko What version of cuda-gdb do you have installed?

sbobko commented 3 years ago

@eltonwells Hi, something like this

NVIDIA (R) CUDA Debugger 9.1 release Portions Copyright (C) 2007-2017 NVIDIA Corporation GNU gdb (GDB) 7.12 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

eltonwells commented 3 years ago

@sbobko CUDA 9.1 is a little old, have you tried a newer version?

Also looking at your screenshot (particularly the call stack view), are you running more than one matrixMul debug session at the same time?

sbobko commented 3 years ago

I tried again after I updated everything: Ubuntu 20.04 NVIDIA_CUDA-11.4 CUDA Debugger 10.1 Fresh launch without prior attempts( to eliminate possible problems) And nothing has changed. the error is still here... image

Maybe there are still-any actions or checks that I could do?

iosmers commented 2 years ago

hi, I meet the same problem, do you solve it?

gmax0 commented 2 years ago

A workaround that worked for me:

Install the latest cuda-gdb as mentioned here: https://github.com/NVIDIA/nsight-vscode-edition/issues/8

Within my launch configuration, I set the debugger path to the cuda-gdb bin installed to my conda environment.

"debuggerPath": "condapath/cuda-gdb"

Relaunched and my variables are now showing.

I imagine simply upgrading to the newest Cuda Toolkit will resolve this issue as well, but in my case I can't since I'm working with code that's written for 9.1.

sunlong169 commented 2 years ago

I encounter such a problem when using GDB other than CUDA-GDB. What a surprise!