diff options
Diffstat (limited to 'editors/code/src/debug.ts')
-rw-r--r-- | editors/code/src/debug.ts | 21 |
1 files changed, 9 insertions, 12 deletions
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 | ||