aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/debug.ts
diff options
context:
space:
mode:
authorvsrs <[email protected]>2020-05-14 09:12:10 +0100
committervsrs <[email protected]>2020-05-14 09:12:10 +0100
commit3ffc26eaebb1f9491477e99d5187b048bd489cd6 (patch)
tree2c6a61803187848d2ec595e40c42edd320ac8e6c /editors/code/src/debug.ts
parent9ebb2acdca6c711cff7bfc84a410794739092dbe (diff)
Remove "rust-analyzer.debug.useLaunchJson" option
Diffstat (limited to 'editors/code/src/debug.ts')
-rw-r--r--editors/code/src/debug.ts21
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