1

我在 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

我已经安装了这些扩展:

4

1 回答 1

1

真正的问题是Error disabling address space randomization: Operation not permitted. Missing auto-load script您通常可以忽略的警告。

该问题可能是由虚拟化引起的。

尝试添加set disable-randomization off.gdbinit.

你也可以关注这个flatpak issue 1301

于 2018-08-14T15:42:35.753 回答