我開始學習Rust,並且想在Visual Studio Code中設置調試,但無法獲得斷點工作。我使用本地調試& VS代碼的RustyCode擴展。在Visual Studio中用gdb調試Rust時,斷點沒有命中代碼
這裏是我的啓動文件:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "gdb",
"request": "launch",
"target": "target/debug/test",
"cwd": "${workspaceRoot}"
}
]
}
但是當我運行這個配置,斷點沒有被擊中。我看到在調試器啓動和應用程序運行得很好的調試控制檯,但有一個警告信息「沒有加載符號」:
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
Running executable
[New Thread 32168.0x81e0]
[New Thread 32168.0x3360]
[New Thread 32168.0x61b8]
[New Thread 32168.0x8040]
The program "+ + * - /" calculates the value 1
[Thread 32168.0x61b8 exited with code 0]
[Thread 32168.0x3360 exited with code 0]
[Thread 32168.0x8040 exited with code 0]
[Inferior 1 (process 32168) exited normally]
這裏是source of the app I am using。我怎樣才能讓斷點工作?
什麼是您正在使用的gdb版本? – ks1322
GNU gdb(GDB)7.9.1 – vmg