aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvsrs <[email protected]>2020-05-07 16:35:48 +0100
committervsrs <[email protected]>2020-05-07 16:35:48 +0100
commit435a17ecd8806f3ae81edf6277c17363b01f4334 (patch)
treea556235ce688369fccf9092d84bca1c478602e88
parent5426e2927e317a5e78179a5bd74b9414c0651b86 (diff)
Add separate settings for each debug engine.
-rw-r--r--editors/code/package.json4
-rw-r--r--editors/code/src/commands/runnables.ts9
2 files changed, 8 insertions, 5 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 84aea8249..e4dd66924 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -427,7 +427,7 @@
427 "rust-analyzer.debug.engineSettings": { 427 "rust-analyzer.debug.engineSettings": {
428 "type": "object", 428 "type": "object",
429 "default": {}, 429 "default": {},
430 "description": "Optional settings passed to the debug engine." 430 "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }"
431 } 431 }
432 } 432 }
433 }, 433 },
@@ -609,4 +609,4 @@
609 } 609 }
610 ] 610 ]
611 } 611 }
612} 612} \ No newline at end of file
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts
index 782a7ba89..e62de7d6e 100644
--- a/editors/code/src/commands/runnables.ts
+++ b/editors/code/src/commands/runnables.ts
@@ -134,9 +134,12 @@ export function debugSingle(ctx: Ctx): Cmd {
134 } 134 }
135 135
136 const executable = await getDebugExecutable(config); 136 const executable = await getDebugExecutable(config);
137 let debugConfig = knownEngines[debugEngine.id](config, executable, debugOptions.sourceFileMap); 137 const debugConfig = knownEngines[debugEngine.id](config, executable, debugOptions.sourceFileMap);
138 for (var key in debugOptions.engineSettings) { 138 if (debugConfig.type in debugOptions.engineSettings) {
139 debugConfig[key] = (debugOptions.engineSettings as any)[key]; 139 const settingsMap = (debugOptions.engineSettings as any)[debugConfig.type];
140 for (var key in settingsMap) {
141 debugConfig[key] = settingsMap[key];
142 }
140 } 143 }
141 144
142 debugOutput.appendLine("Launching debug configuration:"); 145 debugOutput.appendLine("Launching debug configuration:");