mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 23:24:29 +00:00
Debug lens fix for a binary.
This commit is contained in:
parent
efac093093
commit
d264d7b9f2
1 changed files with 8 additions and 4 deletions
|
@ -51,10 +51,14 @@ export class Cargo {
|
|||
|
||||
// arguments for a runnable from the quick pick should be updated.
|
||||
// see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
|
||||
if (cargoArgs[0] === "run") {
|
||||
cargoArgs[0] = "build";
|
||||
} else if (cargoArgs.indexOf("--no-run") === -1) {
|
||||
cargoArgs.push("--no-run");
|
||||
switch (cargoArgs[0]) {
|
||||
case "run": cargoArgs[0] = "build"; break;
|
||||
case "test": {
|
||||
if (cargoArgs.indexOf("--no-run") === -1) {
|
||||
cargoArgs.push("--no-run");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let artifacts = await this.artifactsFromArgs(cargoArgs);
|
||||
|
|
Loading…
Reference in a new issue