我试图在代码中查看一些断点。我为代码安装了rust-analyzer、codelldb和native debug插件,并生成默认的launch.json。调试器似乎没有正确地附加到进程,而是在断点上运行。这可能是一些简单的错误--这是我的launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'thedrewreport'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=thedrewreport"
],
"filter": {
"name": "thedrewreport",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'thedrewreport'",
"cargo": {
"args": [
"build",
"--bin=thedrewreport",
"--package=thedrewreport"
],
"filter": {
"name": "thedrewreport",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'thedrewreport'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=thedrewreport",
"--package=thedrewreport"
],
"filter": {
"name": "thedrewreport",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}有什么想法吗?
发布于 2022-08-26 02:14:15
尝试删除目标浮标,而不是按F5自动生成和调试。这可能是因为您是从控制台构建的,但是生成时没有调试信息。
https://stackoverflow.com/questions/72113270
复制相似问题