Skip to content

Rust debugger doesn't break on panics #48231

@190n

Description

@190n

Reproduction steps

  1. Create an empty Rust project with cargo init and change the main function in src/main.rs to panic!("oh no")
  2. Open the debug menu in Zed (F4) and select "Run (Language: Rust)" from the list

Current vs. Expected behavior

Current behavior: the program panics and exits without ever pausing in the debugger:

Image

Note that the "Rust: on panic" breakpoint is enabled.

Expected behavior: the debugger pauses on the panic.

I see that CodeLLDB 1.11.8 seems to have fixed a related issue. It's not obvious how to check or control which CodeLLDB version Zed uses, but from the DAP logs it sounds like I have 1.12.1:

stderr: [0.7 INFO codelldb] Loaded "/Users/ben/Library/Application Support/Zed/debug_adapters/CodeLLDB/CodeLLDB_v1.12.1/extension/lldb/lib/liblldb.dylib", version="lldb version 21.1.7-codelldb"

Zed version and system specs

Zed: v0.221.5+stable.141.03bfbf242c57f7fdb45708d63d74182898edf2c5 (Zed)
OS: macOS 15.6
Memory: 48 GiB
Architecture: aarch64

Attach Zed log file

No response

Relevant Zed settings

No response

Relevant Keymap

No response

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:debuggerFeedback for Debuggerarea:languages/rustRust programming language supportarea:parity/vscodeFeedback for VSCode parity featuresfrequency:commonBugs that happen for at least a third of the users across all platforms and kinds of usagepriority:P2Average run-of-the-mill bugsstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions