Multiple binaries support for launch.json.

Generate unique names on the LSP side.
This commit is contained in:
vsrs 2020-05-14 16:02:01 +03:00
parent 5f6cdae18f
commit 20fdd14c62
2 changed files with 7 additions and 3 deletions

View file

@ -88,8 +88,9 @@ export async function getDebugConfiguration(ctx: Ctx, config: ra.Runnable): Prom
}
if (debugConfig.name === "run binary") {
// A workaround for multiple binaries. It would be better to get proper names on the LSP side.
debugConfig.name = `run binary [${path.basename(executable)}]`;
// The LSP side: crates\rust-analyzer\src\main_loop\handlers.rs,
// fn to_lsp_runnable(...) with RunnableKind::Bin
debugConfig.name = `run binary '${path.basename(executable)}'`;
}
if (debugConfig.cwd) {