1

I installed flatpak Visual Studio Code on Linux Mint. I'm trying to debug the "Hello world app" from the Rust book in VS Code.

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}"
  }
 ]
}

When I cargo build the program and try to debug it, I get this error in Debug console:

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

I have installed these extensions:

1 Answer 1

1

The real problem is the Error disabling address space randomization: Operation not permitted. The Missing auto-load script warning you can usually ignore.

The problem is likely caused by virtualization.

Try adding set disable-randomization off into the .gdbinit.

You might also follow this flatpak issue 1301.

Sign up to request clarification or add additional context in comments.

2 Comments

Parto of the error seems to disappear when I put the .gdbinit into home directory, however the debugign still does not work - the script gets executed, but for example breakpoints are not functional etc.
Okay, let's hope flatpak users will stop by and add more. Are you using --devel?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.