Skip to content

Commit

Permalink
Add logging when interpreter path changes (#21210)
Browse files Browse the repository at this point in the history
For #21208
  • Loading branch information
Kartik Raj authored May 9, 2023
1 parent 8d291f7 commit 5eef525
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client/common/interpreterPathService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import * as fs from 'fs-extra';
import { inject, injectable } from 'inversify';
import { ConfigurationChangeEvent, ConfigurationTarget, Event, EventEmitter, Uri } from 'vscode';
import { traceError } from '../logging';
import { traceError, traceVerbose } from '../logging';
import { IApplicationEnvironment, IWorkspaceService } from './application/types';
import { PythonSettings } from './configSettings';
import { isTestExecution } from './constants';
Expand Down Expand Up @@ -56,6 +56,7 @@ export class InterpreterPathService implements IInterpreterPathService {
public async onDidChangeConfiguration(event: ConfigurationChangeEvent) {
if (event.affectsConfiguration(`python.${defaultInterpreterPathSetting}`)) {
this._didChangeInterpreterEmitter.fire({ uri: undefined, configTarget: ConfigurationTarget.Global });
traceVerbose('Interpreter Path updated', `python.${defaultInterpreterPathSetting}`);
}
}

Expand Down Expand Up @@ -129,6 +130,7 @@ export class InterpreterPathService implements IInterpreterPathService {
if (persistentSetting.value !== pythonPath) {
await persistentSetting.updateValue(pythonPath);
this._didChangeInterpreterEmitter.fire({ uri: resource, configTarget });
traceVerbose('Interpreter Path updated', settingKey, pythonPath);
}
}

Expand Down

0 comments on commit 5eef525

Please sign in to comment.