From 5426e2927e317a5e78179a5bd74b9414c0651b86 Mon Sep 17 00:00:00 2001 From: vsrs Date: Thu, 7 May 2020 17:07:58 +0300 Subject: Add additional debug options --- editors/code/src/commands/runnables.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'editors/code/src/commands') diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index 7bb8727e7..782a7ba89 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts @@ -91,8 +91,6 @@ function getCppvsDebugConfig(config: ra.Runnable, executable: string, sourceFile const debugOutput = vscode.window.createOutputChannel("Debug"); async function getDebugExecutable(config: ra.Runnable): Promise { - debugOutput.clear(); - const cargo = new Cargo(config.cwd || '.', debugOutput); const executable = await cargo.executableFromArgs(config.args); @@ -130,8 +128,16 @@ export function debugSingle(ctx: Ctx): Cmd { return; } + debugOutput.clear(); + if (ctx.config.debug.openUpDebugPane) { + debugOutput.show(true); + } + const executable = await getDebugExecutable(config); - const debugConfig = knownEngines[debugEngine.id](config, executable, debugOptions.sourceFileMap); + let debugConfig = knownEngines[debugEngine.id](config, executable, debugOptions.sourceFileMap); + for (var key in debugOptions.engineSettings) { + debugConfig[key] = (debugOptions.engineSettings as any)[key]; + } debugOutput.appendLine("Launching debug configuration:"); debugOutput.appendLine(JSON.stringify(debugConfig, null, 2)); -- cgit v1.2.3