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

Support for building when a debug session is restarted #17901

Open
basvandriel opened this issue Aug 15, 2024 · 1 comment · May be fixed by #17923
Open

Support for building when a debug session is restarted #17901

basvandriel opened this issue Aug 15, 2024 · 1 comment · May be fixed by #17923
Labels
C-feature Category: feature request

Comments

@basvandriel
Copy link

basvandriel commented Aug 15, 2024

Background
Above every test that you write, a Run Test | Debug header is visible, making it easy to quickly debug one particular test.
When you debug, the project is compiled first, and then the process starts.

#[test]
fn test_x() {
    assert_eq!("1", "1.1.0");
}

However, when you press the restart button, the compile process is not restarted. When you change code in the mean time, you'd have to end the debugging session and run it again.

Suggested feature

  • Have an rust-analyzer.debug.prestartcommand option to make the users fill in a command to rebuild the process.
  • Re-compile the project when the restart button is pressed. If this is an unwanted feature, make it configurable via rust-analyzer.debug.recompileAfterRestart
@basvandriel basvandriel added the C-feature Category: feature request label Aug 15, 2024
@basvandriel
Copy link
Author

A pull request for this is progress. I've tested this by running cargo test --no-run after every debugging session ends with the same session ID.

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

Successfully merging a pull request may close this issue.

1 participant