Skip to content

Fix incorrect "Restart Extensions" for a disabled extension#311172

Open
argothiel wants to merge 1 commit intomicrosoft:mainfrom
argothiel:bug-edh-restart-extensions
Open

Fix incorrect "Restart Extensions" for a disabled extension#311172
argothiel wants to merge 1 commit intomicrosoft:mainfrom
argothiel:bug-edh-restart-extensions

Conversation

@argothiel
Copy link
Copy Markdown

When a marketplace extension is disabled and a dev extension with the same ID is running (via Extension Development Host), the disabled extension incorrectly shows a "Restart Extensions" badge. Clicking this badge removes the dev extension from EDH.

Root cause: In extensionsWorkbenchService.ts, getRuntimeState() checks if a running extension with the same ID exists to determine if restart is needed. However, it doesn't distinguish between the marketplace extension and a dev extension - they're different extensions that happen to share an ID.

Fix: Add a check for runningExtension.isUnderDevelopment in the isSameExtensionRunning condition for disabled extensions in getRuntimeState(). A dev extension should not trigger "Restart Extensions" for a disabled marketplace extension with the same ID.

Fixes #311167

When a marketplace extension is disabled and a dev extension with the same
ID is running (via Extension Development Host), the disabled extension
incorrectly shows a "Restart Extensions" badge. Clicking this badge removes
the dev extension from EDH.

Root cause: In extensionsWorkbenchService.ts, getRuntimeState() checks if
a running extension with the same ID exists to determine if restart is
needed. However, it doesn't distinguish between the marketplace extension
and a dev extension - they're different extensions that happen to share
an ID.

Fix: Add a check for runningExtension.isUnderDevelopment in the
isSameExtensionRunning condition for disabled extensions in
getRuntimeState(). A dev extension should not trigger "Restart Extensions"
for a disabled marketplace extension with the same ID.

Fixes microsoft#311167
@argothiel
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EDH: Incorrect "Restart Extensions" badge for a disabled extension when dev extension is running

2 participants