我在 Linux Mint 上安装了 flatpak Visual Studio Code。我正在尝试从 VS Code 中的 Rust 书中调试“Hello world 应用程序”。
src/main.rs:
fn main() {
println!("Hello, world!");
}
启动.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug program",
"type": "gdb",
"request": "launch",
"target": "../target/debug/hello",
"cwd": "${workspaceRoot}"
}
]
}
当我cargo build
编写程序并尝试调试它时,我在调试控制台中收到此错误:
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/gorn/nextcloud/viptrader/rust/target/debug/hello.
Use `info auto-load python-scripts [REGEXP]' to list them.
Running executable
warning: Error disabling address space randomization: Operation not permitted
我已经安装了这些扩展:
- rust-lang.rust
- webfreak.debug