aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/config.ts3
-rw-r--r--editors/code/src/debug.ts21
2 files changed, 10 insertions, 14 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 24002483d..1652827c3 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -116,8 +116,7 @@ export class Config {
116 engine: this.get<string>("debug.engine"), 116 engine: this.get<string>("debug.engine"),
117 engineSettings: this.get<object>("debug.engineSettings"), 117 engineSettings: this.get<object>("debug.engineSettings"),
118 openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"), 118 openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"),
119 sourceFileMap: sourceFileMap, 119 sourceFileMap: sourceFileMap
120 useLaunchJson: this.get<object>("debug.useLaunchJson"),
121 }; 120 };
122 } 121 }
123} 122}
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index bbf3ff312..b500fe029 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -98,18 +98,15 @@ export async function startDebugSession(ctx: Ctx, config: ra.Runnable): Promise<
98 let debugConfig: vscode.DebugConfiguration | undefined = undefined; 98 let debugConfig: vscode.DebugConfiguration | undefined = undefined;
99 let message = ""; 99 let message = "";
100 100
101 if (ctx.config.debug.useLaunchJson) { 101 const wsLaunchSection = vscode.workspace.getConfiguration("launch");
102 const wsLaunchSection = vscode.workspace.getConfiguration("launch"); 102 const configurations = wsLaunchSection.get<any[]>("configurations") || [];
103 const configurations = wsLaunchSection.get<any[]>("configurations") || []; 103
104 104 const index = configurations.findIndex(c => c.name === config.label);
105 const index = configurations.findIndex(c => c.name === config.label); 105 if (-1 !== index) {
106 if (-1 !== index) { 106 debugConfig = configurations[index];
107 debugConfig = configurations[index]; 107 message = " (from launch.json)";
108 message = " (from launch.json)"; 108 debugOutput.clear();
109 debugOutput.clear(); 109 } else {
110 }
111 }
112 if (!debugConfig) {
113 debugConfig = await getDebugConfiguration(ctx, config); 110 debugConfig = await getDebugConfiguration(ctx, config);
114 } 111 }
115 112