Add special auto value for debug.sourceFileMap

This commit is contained in:
vsrs 2021-04-22 16:09:46 +03:00
parent 8f781e782c
commit 1ebfe11730
5 changed files with 38 additions and 27 deletions

View file

@ -134,8 +134,12 @@ export class Config {
}
get debug() {
// "/rustc/<id>" used by suggestions only.
const { ["/rustc/<id>"]: _, ...sourceFileMap } = this.get<Record<string, string>>("debug.sourceFileMap");
let sourceFileMap = this.get<Record<string, string> | "auto">("debug.sourceFileMap");
if (sourceFileMap !== "auto") {
// "/rustc/<id>" used by suggestions only.
const { ["/rustc/<id>"]: _, ...trimmed } = this.get<Record<string, string>>("debug.sourceFileMap");
sourceFileMap = trimmed;
}
return {
engine: this.get<string>("debug.engine"),