Skip to content

.inspect does not return the updated setting but .get does #135121

@karrtikr

Description

@karrtikr

Does this issue occur when all extensions are disabled?: Yes

Version: 1.61.0 (user setup)
OS: Windows_NT x64 10.0.22471

Steps to Reproduce:

Started happening after VSCode release. FYI we haven't been able to reproduce this issue locally, happens with Github action: microsoft/vscode-python#17708 cc @karthiknadig

  1. Update a setting, for eg.
    const pythonConfig = vscode.workspace.getConfiguration('python');
    await pythonConfig.update('defaultInterpreterPath', 'pythonPath', false);
  1. Wait for the change event to fire via workspace.onDidChangeConfiguration.
  2. Query configuration via .inspect and .get:
    const currentConfig = this.workspace.getConfiguration('python', this.workspaceRoot);
    console.log(`Changed path [default]: ${currentConfig.get<string>('defaultInterpreterPath')}`);
    console.log('Inspect path [default]', JSON.stringify(currentConfig.inspect('defaultInterpreterPath')));
  1. Notice .get returns the correct info and inspect doesn't.

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions