mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Add separate settings for each debug engine.
This commit is contained in:
parent
5426e2927e
commit
435a17ecd8
2 changed files with 8 additions and 5 deletions
|
@ -427,7 +427,7 @@
|
|||
"rust-analyzer.debug.engineSettings": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"description": "Optional settings passed to the debug engine."
|
||||
"description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -609,4 +609,4 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -134,9 +134,12 @@ export function debugSingle(ctx: Ctx): Cmd {
|
|||
}
|
||||
|
||||
const executable = await getDebugExecutable(config);
|
||||
let debugConfig = knownEngines[debugEngine.id](config, executable, debugOptions.sourceFileMap);
|
||||
for (var key in debugOptions.engineSettings) {
|
||||
debugConfig[key] = (debugOptions.engineSettings as any)[key];
|
||||
const debugConfig = knownEngines[debugEngine.id](config, executable, debugOptions.sourceFileMap);
|
||||
if (debugConfig.type in debugOptions.engineSettings) {
|
||||
const settingsMap = (debugOptions.engineSettings as any)[debugConfig.type];
|
||||
for (var key in settingsMap) {
|
||||
debugConfig[key] = settingsMap[key];
|
||||
}
|
||||
}
|
||||
|
||||
debugOutput.appendLine("Launching debug configuration:");
|
||||
|
|
Loading…
Reference in a new issue