Skip to content
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

RA 0.3.2029 doesn't respect breakpoints #17568

Open
ThomasCartier opened this issue Jul 9, 2024 · 12 comments
Open

RA 0.3.2029 doesn't respect breakpoints #17568

ThomasCartier opened this issue Jul 9, 2024 · 12 comments
Labels
A-vscode vscode plugin issues C-bug Category: bug

Comments

@ThomasCartier
Copy link

Hi,
RA 0.3.2020 respects the breakpoints but not the 2029 version when running Debug with from inlay in test module.

mod test {
#[test]

        fn test_ra() {

                println!("OK");

                println!("OK");
        }
}

A breakpoint to any statement won't stop.

VScode

Version: 1.91.0
Commit: ea1445cc7016315d0f5728f8e8b12a45dc0a7286
Date: 2024-07-01T18:52:41.959Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.9.7-amd64
active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.81.0-nightly (d7f6ebace 2024-06-16)

Stepping down to 2020 solves the issue. Any new option to be aware of ?

@ThomasCartier ThomasCartier added the C-bug Category: bug label Jul 9, 2024
@davidbarsky
Copy link
Contributor

Not aware of any changes, but note that rust-analyzer does not handle debugging Rust code; it only integrates with existing debugging tools. It might be that your code is not being built with debug info.

@ThomasCartier
Copy link
Author

You are right but I gelt like to report a change that happened right after the RA update and that disappeared with the downgrade. Maybe someone has an idea of what's going on..

@Veykril
Copy link
Member

Veykril commented Jul 9, 2024

There was a change to the debug task here cb523fc which broke some stuff, and another followup in https://github.com/rust-lang/rust-analyzer/blob/master/editors/code/src/debug.ts which fixed things btu this might still have changed some behavior

@ThomasCartier
Copy link
Author

Just a side note, I still have the same issue with RA v2037 and codeLLDB, in vscode.

Anyone else experience this ? I would like to not be stuck in v2020.

@Veykril
Copy link
Member

Veykril commented Jul 16, 2024

I think I found the issue on our side

@ThomasCartier
Copy link
Author

@Veykril Just installed v2045 and the problem still occurs.

@Veykril Veykril added the A-vscode vscode plugin issues label Jul 23, 2024
@Veykril
Copy link
Member

Veykril commented Jul 23, 2024

Thanks for checking again, I'll take another look. What debugging extension are you using?

@ThomasCartier
Copy link
Author

@Veykril : many thanks to you. I use codeLLDB. Every extensions are up to date on my system.

@Veykril
Copy link
Member

Veykril commented Jul 23, 2024

Hmm, breakpoints do work for me on the latest release 😕

@ThomasCartier
Copy link
Author

I will try with a naked vscode and see. I will report in two/three hours. Thanks a lot

@ThomasCartier
Copy link
Author

Ok it works on a naked installation.
I will report the setting(s) that mess everything, in case anyone else has the same issue.
Then I will close this issue.

@ThomasCartier
Copy link
Author

ThomasCartier commented Jul 23, 2024

@Veykril found the culprit!

it's "rust-analyzer.runnables.extraArgs" coupled with "release".

in my setting.json I had:

"rust-analyzer.runnables.extraArgs": [
        "--release"
]

that launched the optimized version of my code when clicking the "release" inlay button above my test.
Now, it seems that it is working differently and
replaces:

"rust-analyzer.runnables.extraTestBinaryArgs": [
        "--show-output",
        "--nocapture"
],

which is a differing behavior from v2020. It is as if extraTestBinaryArgs was overwritten by the extraArgs.
It's in the inlay button management that the issue lies.

When removing extraArgs, a click on the debug button works fine, as usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-vscode vscode plugin issues C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants