我无法用安装在窗口上的VScode调试WSL中的锈蚀代码。在debug期间,我会得到这些错误。
Error: there is no registered task type 'codelldb.cargo'. Did you miss installing an extension that provides a corresponding task provider?
Error: there is no registered task type 'codelldb.cargo'. Did you miss installing an extension that provides a corresponding task provider?这是我的launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'foo'",
"cargo": {
"args": [
"build",
"--bin=foo",
"--package=foo"
],
"filter": {
"name": "foo",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
]
}奇怪的是,我可以使用vscode来run我的代码&获得预期的输出。
我已经在vscode中安装了WSL的扩展名。
codeLLDB
rust-analyzer这些是软件的版本。
WSL: version 1
vscode: 1.72.2
windows : Windows 10我在这里所缺少的
发布于 2022-11-04 08:20:29
这个问题是由于WSL版本。将WSL从v1升级到v2后,问题得到了解决
https://stackoverflow.com/questions/74127500
复制相似问题