I started learning Rust, and I want to set up debugging in Visual Studio Code, but can't get breakpoints working. I use the Native Debug & RustyCode extensions for VS Code.
Here is my launch file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "gdb",
"request": "launch",
"target": "target/debug/test",
"cwd": "${workspaceRoot}"
}
]
}
But when I run this configuration, breakpoints do not get hit. I see in the debug console that the debugger started and the app ran fine, but there is a warning message "No Symbols loaded":
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]
Here is the source of the app I am using. How can I make breakpoints work?