Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't refresh variables on every console execution #5871

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,20 @@ export class PositronVariablesService extends Disposable implements IPositronVar

const { sessionId } = session;

// No-op if this is already the active instance. Setting the active
// instance below triggers a refresh, so avoid it if if the instance is
// already active.
if (this._activePositronVariablesInstance?.session.sessionId === sessionId) {
return;
}

const positronVariablesInstance = this._positronVariablesInstancesBySessionId.get(
sessionId
);

if (positronVariablesInstance) {
this._setActivePositronVariablesInstance(positronVariablesInstance);
return
return;
}

this._logService.error(`Cannot show Variables: ${formatLanguageRuntimeSession(session)} became active, but a Variables instance for it is not running.`);
Expand Down
Loading