about summary refs log tree commit diff
path: root/editors/code/src/debug.ts
diff options
context:
space:
mode:
authorvsrs <vit@conrlab.com>2020-05-14 13:48:02 +0300
committervsrs <vit@conrlab.com>2020-05-14 13:48:02 +0300
commitaf7c50f8a2e6763d4d72d0fa0b33e62b12aaf1c7 (patch)
tree4a2ede9323e924cb51b74cb8da92a3e4da2a145d /editors/code/src/debug.ts
parenta233346a2d08bde9869d86d14e67ca3290c10cb2 (diff)
downloadrust-af7c50f8a2e6763d4d72d0fa0b33e62b12aaf1c7.tar.gz
rust-af7c50f8a2e6763d4d72d0fa0b33e62b12aaf1c7.zip
Multiple binaries support for launch.json.
Diffstat (limited to 'editors/code/src/debug.ts')
-rw-r--r--editors/code/src/debug.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index b500fe029a5..966019883dd 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -87,6 +87,11 @@ 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)}]`;
+    }
+
     if (debugConfig.cwd) {
         debugConfig.cwd = simplifyPath(debugConfig.cwd);
     }