【问题标题】:Visual Studio Code errors when debugging Rust with "Missing auto-load debug_gdb_scripts"使用“Missing auto-load debug_gdb_scripts”调试 Rust 时出现 Visual Studio Code 错误
【发布时间】:2018-08-14 15:34:57
【问题描述】:

我在 Linux Mint 上安装了 flatpak Visual Studio Code。我正在尝试从 VS Code 中的 Rust 书中调试“Hello world 应用程序”。

src/main.rs

fn main() {
  println!("Hello, world!");
}

launch.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

我已经安装了这些扩展:

【问题讨论】:

    标签: visual-studio-code rust vscode-debugger


    【解决方案1】:

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

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

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

    你也可以关注这个flatpak issue 1301

    【讨论】:

    • 当我将.gdbinit 放入主目录时,部分错误似乎消失了,但是调试仍然不起作用 - 脚本被执行,但例如断点不起作用等。跨度>
    • 好的,我们希望flatpak 的用户会停下来添加更多内容。你在用--devel吗?
    猜你喜欢
    • 1970-01-01
    • 2017-02-15
    • 1970-01-01
    • 2019-03-09
    • 1970-01-01
    • 1970-01-01
    • 2020-01-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多