Visual studio code 使用“调试时出现Visual Studio代码错误”;缺少自动加载调试“gdb”脚本;
我在LinuxMint上安装了flatpak Visual Studio代码。我正在尝试调试VS代码中的Rust book中的“Hello world应用程序” src/main.rs:Visual studio code 使用“调试时出现Visual Studio代码错误”;缺少自动加载调试“gdb”脚本;,visual-studio-code,rust,vscode-debugger,Visual Studio Code,Rust,Vscode Debugger,我在LinuxMint上安装了flatpak Visual Studio代码。我正在尝试调试VS代码中的Rust book中的“Hello world应用程序” src/main.rs: { "version": "0.2.0", "configurations": [ { "name": "Debug program", "type": "gdb", "request": "launch", "target": "../target/debug/hel
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug program",
"type": "gdb",
"request": "launch",
"target": "../target/debug/hello",
"cwd": "${workspaceRoot}"
}
]
}
fn main(){
println!(“你好,世界!”);
}
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug program",
"type": "gdb",
"request": "launch",
"target": "../target/debug/hello",
"cwd": "${workspaceRoot}"
}
]
}
当我cargo build
程序并尝试调试它时,在调试控制台中出现以下错误:
警告:节中偏移量0处缺少自动加载脚本。调试\u gdb\u脚本
文件/home/gorn/nextcloud/viptrader/rust/target/debug/hello。
使用'info auto load python scripts[REGEXP]'列出它们。
正在运行的可执行文件
警告:禁用地址空间随机化时出错:不允许操作
我已经安装了这些扩展:
- 铁锈
错误禁用地址空间随机化:不允许操作
。通常可以忽略的缺少自动加载脚本警告
问题可能是由虚拟化引起的
试着把它添加到数据库中
您也可以这样做。当我将.gdbinit
放入主目录时,部分错误似乎消失了,但是调试仍然不起作用-脚本得到执行,但例如断点不起作用等。好吧,希望flatpak
用户会停下来添加更多。你在用什么?