Add output of current configuration to diagnostics command (#3866)

This commit is contained in:
Colen Garoutte-Carson
2019-07-01 19:38:25 -07:00
committed by GitHub
parent 5b3d4ebf44
commit 27a3c9958d
+6 -1
View File
@@ -770,9 +770,14 @@ class DefaultClient implements Client {
this.diagnosticsChannel = vscode.window.createOutputChannel("C/C++ Diagnostics");
this.disposables.push(this.diagnosticsChannel);
}
let header: string = `-------- Diagnostics - ${new Date().toLocaleString()}\n`;
let version: string = `Version: ${util.packageJson.version}\n`;
this.diagnosticsChannel.appendLine(`${header}${version}${response.diagnostics}`);
let configJson: string = "";
if (this.configuration.CurrentConfiguration) {
configJson = `Current Configuration:\n${JSON.stringify(this.configuration.CurrentConfiguration, null, 4)}\n`;
}
this.diagnosticsChannel.appendLine(`${header}${version}${configJson}${response.diagnostics}`);
this.diagnosticsChannel.show(false);
}