diff options
author | vsrs <[email protected]> | 2020-05-14 09:12:10 +0100 |
---|---|---|
committer | vsrs <[email protected]> | 2020-05-14 09:12:10 +0100 |
commit | 3ffc26eaebb1f9491477e99d5187b048bd489cd6 (patch) | |
tree | 2c6a61803187848d2ec595e40c42edd320ac8e6c /editors/code | |
parent | 9ebb2acdca6c711cff7bfc84a410794739092dbe (diff) |
Remove "rust-analyzer.debug.useLaunchJson" option
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 5 | ||||
-rw-r--r-- | editors/code/src/config.ts | 3 | ||||
-rw-r--r-- | editors/code/src/debug.ts | 21 |
3 files changed, 10 insertions, 19 deletions
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 @@ | |||
443 | "type": "object", | 443 | "type": "object", |
444 | "default": {}, | 444 | "default": {}, |
445 | "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }" | 445 | "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }" |
446 | }, | ||
447 | "rust-analyzer.debug.useLaunchJson": { | ||
448 | "description": "Whether to use existing configurations from launch.json.", | ||
449 | "type": "boolean", | ||
450 | "default": false | ||
451 | } | 446 | } |
452 | } | 447 | } |
453 | }, | 448 | }, |
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 | ||