Skip to content

Commit 3ffc26e

Browse files
committed
Remove "rust-analyzer.debug.useLaunchJson" option
1 parent 9ebb2ac commit 3ffc26e

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

editors/code/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,6 @@
443443
"type": "object",
444444
"default": {},
445445
"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
451446
}
452447
}
453448
},

editors/code/src/config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ export class Config {
116116
engine: this.get<string>("debug.engine"),
117117
engineSettings: this.get<object>("debug.engineSettings"),
118118
openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"),
119-
sourceFileMap: sourceFileMap,
120-
useLaunchJson: this.get<object>("debug.useLaunchJson"),
119+
sourceFileMap: sourceFileMap
121120
};
122121
}
123122
}

editors/code/src/debug.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,15 @@ export async function startDebugSession(ctx: Ctx, config: ra.Runnable): Promise<
9898
let debugConfig: vscode.DebugConfiguration | undefined = undefined;
9999
let message = "";
100100

101-
if (ctx.config.debug.useLaunchJson) {
102-
const wsLaunchSection = vscode.workspace.getConfiguration("launch");
103-
const configurations = wsLaunchSection.get<any[]>("configurations") || [];
104-
105-
const index = configurations.findIndex(c => c.name === config.label);
106-
if (-1 !== index) {
107-
debugConfig = configurations[index];
108-
message = " (from launch.json)";
109-
debugOutput.clear();
110-
}
111-
}
112-
if (!debugConfig) {
101+
const wsLaunchSection = vscode.workspace.getConfiguration("launch");
102+
const configurations = wsLaunchSection.get<any[]>("configurations") || [];
103+
104+
const index = configurations.findIndex(c => c.name === config.label);
105+
if (-1 !== index) {
106+
debugConfig = configurations[index];
107+
message = " (from launch.json)";
108+
debugOutput.clear();
109+
} else {
113110
debugConfig = await getDebugConfiguration(ctx, config);
114111
}
115112

0 commit comments

Comments
 (0)