From 3ffc26eaebb1f9491477e99d5187b048bd489cd6 Mon Sep 17 00:00:00 2001 From: vsrs Date: Thu, 14 May 2020 11:12:10 +0300 Subject: Remove "rust-analyzer.debug.useLaunchJson" option --- editors/code/package.json | 5 ----- editors/code/src/config.ts | 3 +-- editors/code/src/debug.ts | 21 +++++++++------------ 3 files changed, 10 insertions(+), 19 deletions(-) (limited to 'editors/code') diff --git a/editors/code/package.json b/editors/code/package.json index 34dbea0b2..ec325ad3f 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -443,11 +443,6 @@ "type": "object", "default": {}, "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }" - }, - "rust-analyzer.debug.useLaunchJson": { - "description": "Whether to use existing configurations from launch.json.", - "type": "boolean", - "default": false } } }, 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 { engine: this.get("debug.engine"), engineSettings: this.get("debug.engineSettings"), openUpDebugPane: this.get("debug.openUpDebugPane"), - sourceFileMap: sourceFileMap, - useLaunchJson: this.get("debug.useLaunchJson"), + sourceFileMap: sourceFileMap }; } } 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< let debugConfig: vscode.DebugConfiguration | undefined = undefined; let message = ""; - if (ctx.config.debug.useLaunchJson) { - const wsLaunchSection = vscode.workspace.getConfiguration("launch"); - const configurations = wsLaunchSection.get("configurations") || []; - - const index = configurations.findIndex(c => c.name === config.label); - if (-1 !== index) { - debugConfig = configurations[index]; - message = " (from launch.json)"; - debugOutput.clear(); - } - } - if (!debugConfig) { + const wsLaunchSection = vscode.workspace.getConfiguration("launch"); + const configurations = wsLaunchSection.get("configurations") || []; + + const index = configurations.findIndex(c => c.name === config.label); + if (-1 !== index) { + debugConfig = configurations[index]; + message = " (from launch.json)"; + debugOutput.clear(); + } else { debugConfig = await getDebugConfiguration(ctx, config); } -- cgit v1.2.3