rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Support for building when a debug session is restarted

Open basvandriel opened this issue 6 months ago • 1 comments

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 avatar Aug 15 '24 20:08 basvandriel