mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-28 14:24:23 +00:00
Multiple binaries support for launch.json.
Generate unique names on the LSP side.
This commit is contained in:
parent
5f6cdae18f
commit
20fdd14c62
2 changed files with 7 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue