Skip to content

Commit

Permalink
Log the modified extension settings as part of Log Diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbrow committed Aug 23, 2024
1 parent d3cd4fc commit 275d247
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1948,6 +1948,15 @@ export class DefaultClient implements Client {
if (this.configuration.CurrentConfiguration) {
configJson = `Current Configuration:\n${JSON.stringify(this.configuration.CurrentConfiguration, null, 4)}\n`;
}
const userModifiedSettings = Object.entries(this.settingsTracker.getUserModifiedSettings());
if (userModifiedSettings.length > 0) {
const settings: Record<string, any> = {};
for (const [key, ] of userModifiedSettings) {

Check failure on line 1954 in Extension/src/LanguageServer/client.ts

View workflow job for this annotation

GitHub Actions / job / build

Unexpected trailing comma

Check failure on line 1954 in Extension/src/LanguageServer/client.ts

View workflow job for this annotation

GitHub Actions / job / build

Unexpected trailing comma

Check failure on line 1954 in Extension/src/LanguageServer/client.ts

View workflow job for this annotation

GitHub Actions / job / build

Unexpected trailing comma
const newKey = `C_Cpp.${key}`;
settings[newKey] = vscode.workspace.getConfiguration("C_Cpp").get(key) ?? '<error-retrieving-value>';
}
configJson += `Modified Settings:\n${JSON.stringify(settings, null, 4)}\n`;
}

// Get diagnostics for configuration provider info.
let configurationLoggingStr: string = "";
Expand Down

0 comments on commit 275d247

Please sign in to comment.