WSL环境下VS Code中cuda-gdb报错:无法找到LWP用户级线程
WSL环境下VS Code CUDA开发中cuda-gdb报错问题
在WSL环境配置VS Code的CUDA开发环境时,遇到cuda-gdb报错问题。常规gdb调试可正常运行,但启动「CUDA C++: Launch」调试时,调试控制台输出一系列调试文件跳过警告,最终报错Cannot find user-level thread for LWP 4949: generic error;直接在终端运行cuda-gdb时,程序输出预期内容后同样报错Cannot find user-level thread for LWP 4077: generic error。
配置文件
tasks.json
{ "version": "2.0.0", "tasks": [ { "type": "cppbuild", "label": "C/C++: nvcc build active file", "command": "/usr/bin/nvcc", "args": [ "-g", "-G", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": "build", "detail": "compiler: /usr/bin/nvcc" } ] }
launch.json
{ "configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/maintest", "args": [], "stopAtEntry": false, "cwd": "${fileDirname}", "environment": [], "externalConsole": false, "MIMode": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] }, { "name": "CUDA C++: Launch", "type": "cuda-gdb", "request": "launch", "program": "${workspaceFolder}/maintest" } ] }
内容的提问来源于stack exchange,提问作者William Hofsøy
相关产品推荐
相关产品推荐

