mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +00:00
Remove "rust-analyzer.debug.useLaunchJson" option
This commit is contained in:
parent
9ebb2acdca
commit
3ffc26eaeb
3 changed files with 9 additions and 18 deletions
|
@ -443,11 +443,6 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }"
|
"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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -116,8 +116,7 @@ export class Config {
|
||||||
engine: this.get<string>("debug.engine"),
|
engine: this.get<string>("debug.engine"),
|
||||||
engineSettings: this.get<object>("debug.engineSettings"),
|
engineSettings: this.get<object>("debug.engineSettings"),
|
||||||
openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"),
|
openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"),
|
||||||
sourceFileMap: sourceFileMap,
|
sourceFileMap: sourceFileMap
|
||||||
useLaunchJson: this.get<object>("debug.useLaunchJson"),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,18 +98,15 @@ export async function startDebugSession(ctx: Ctx, config: ra.Runnable): Promise<
|
||||||
let debugConfig: vscode.DebugConfiguration | undefined = undefined;
|
let debugConfig: vscode.DebugConfiguration | undefined = undefined;
|
||||||
let message = "";
|
let message = "";
|
||||||
|
|
||||||
if (ctx.config.debug.useLaunchJson) {
|
const wsLaunchSection = vscode.workspace.getConfiguration("launch");
|
||||||
const wsLaunchSection = vscode.workspace.getConfiguration("launch");
|
const configurations = wsLaunchSection.get<any[]>("configurations") || [];
|
||||||
const configurations = wsLaunchSection.get<any[]>("configurations") || [];
|
|
||||||
|
|
||||||
const index = configurations.findIndex(c => c.name === config.label);
|
const index = configurations.findIndex(c => c.name === config.label);
|
||||||
if (-1 !== index) {
|
if (-1 !== index) {
|
||||||
debugConfig = configurations[index];
|
debugConfig = configurations[index];
|
||||||
message = " (from launch.json)";
|
message = " (from launch.json)";
|
||||||
debugOutput.clear();
|
debugOutput.clear();
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
if (!debugConfig) {
|
|
||||||
debugConfig = await getDebugConfiguration(ctx, config);
|
debugConfig = await getDebugConfiguration(ctx, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue