env:
- OS: windows11 22631.3880
- vsocde 1.91.1
- wsl2
Unable to debug program using automatically generated configuration by codelldb.
The following is the config:
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'hello_world'",
"cargo": {
"args": [
"build",
"--bin=hello_world",
"--package=hello_world"
],
"filter": {
"name": "hello_world",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'hello_world'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=hello_world",
"--package=hello_world"
],
"filter": {
"name": "hello_world",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
When i press f5 or click debug, the breakpoint cannot work.
Something strange happened:
stranges
It seems that the wsl2 didn’t respond.
i have tried methods in other blogs, but it has always been the case. i have no idea about this.
I tried change the args of cargo in config from build
to run
. It didn’t work. A new error appeared: "Cargo invocation failed."
Next4 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2