aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands/runnables.ts12
-rw-r--r--editors/code/src/config.ts2
2 files changed, 11 insertions, 3 deletions
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
91const debugOutput = vscode.window.createOutputChannel("Debug"); 91const debugOutput = vscode.window.createOutputChannel("Debug");
92 92
93async function getDebugExecutable(config: ra.Runnable): Promise<string> { 93async function getDebugExecutable(config: ra.Runnable): Promise<string> {
94 debugOutput.clear();
95
96 const cargo = new Cargo(config.cwd || '.', debugOutput); 94 const cargo = new Cargo(config.cwd || '.', debugOutput);
97 const executable = await cargo.executableFromArgs(config.args); 95 const executable = await cargo.executableFromArgs(config.args);
98 96
@@ -130,8 +128,16 @@ export function debugSingle(ctx: Ctx): Cmd {
130 return; 128 return;
131 } 129 }
132 130
131 debugOutput.clear();
132 if (ctx.config.debug.openUpDebugPane) {
133 debugOutput.show(true);
134 }
135
133 const executable = await getDebugExecutable(config); 136 const executable = await getDebugExecutable(config);
134 const debugConfig = knownEngines[debugEngine.id](config, executable, debugOptions.sourceFileMap); 137 let debugConfig = knownEngines[debugEngine.id](config, executable, debugOptions.sourceFileMap);
138 for (var key in debugOptions.engineSettings) {
139 debugConfig[key] = (debugOptions.engineSettings as any)[key];
140 }
135 141
136 debugOutput.appendLine("Launching debug configuration:"); 142 debugOutput.appendLine("Launching debug configuration:");
137 debugOutput.appendLine(JSON.stringify(debugConfig, null, 2)); 143 debugOutput.appendLine(JSON.stringify(debugConfig, null, 2));
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 8bceaaf72..533be1913 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -113,6 +113,8 @@ export class Config {
113 113
114 return { 114 return {
115 engine: this.get<string>("debug.engine"), 115 engine: this.get<string>("debug.engine"),
116 engineSettings: this.get<object>("debug.engineSettings"),
117 openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"),
116 sourceFileMap: sourceFileMap, 118 sourceFileMap: sourceFileMap,
117 }; 119 };
118 } 120 }