Skip to content

Bug: didn't catch panics #12907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Banyc opened this issue Jul 29, 2022 · 7 comments
Closed

Bug: didn't catch panics #12907

Banyc opened this issue Jul 29, 2022 · 7 comments
Labels
C-support Category: support questions

Comments

@Banyc
Copy link

Banyc commented Jul 29, 2022

rust-analyzer version: 0.3.1140-standalone (7e2b983 2022-07-24)

rustc version: rustc 1.62.1 (e092d0b6b 2022-07-16)

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTUP_HOME or CARGO_HOME)

When panicking, the debug session exited without catching the source of panic. But the breakpoint is still working fine. It is on VSCode.

@lnicola lnicola added the C-support Category: support questions label Jul 29, 2022
@lnicola
Copy link
Member

lnicola commented Jul 29, 2022

We don't have any support for debugging except pointing your debugging extension (CodeLLDB, Native Debug) in the right direction. Those extensions may or may not have support for catching exceptions when they are thrown.

@lnicola
Copy link
Member

lnicola commented Jul 29, 2022

In CodeLLDB it's these ones, but they don't work for me either:

image

Acutally, it doesn't work at all: rust-lang/rust#21102.

@Banyc
Copy link
Author

Banyc commented Jul 29, 2022

@lnicola I have crossposted it to CodeLLDB, and hope this issue can be settled

@lnicola
Copy link
Member

lnicola commented Jul 29, 2022

It's not actually CodeLLDB either, since neither lldb, nor rust-lldb work. You might need to put breakpoints on rust_panic and rust_begin_unwind instead.

@Banyc
Copy link
Author

Banyc commented Jul 29, 2022

@lnicola This issue only happens recently, not a problem before, so I think there is a newly introduced bug somewhere.

@lnicola
Copy link
Member

lnicola commented Jul 29, 2022

Ah, then maybe try compiling with an older Rust version.

@Banyc
Copy link
Author

Banyc commented Jul 29, 2022

Solution

image

add the rust_panic breakpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-support Category: support questions
Projects
None yet
Development

No branches or pull requests

2 participants