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

Auto-reload local workspace extensions when a file in the extension directory gets saved #229288

Open
TomasHubelbauer opened this issue Sep 21, 2024 · 1 comment
Assignees
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality
Milestone

Comments

@TomasHubelbauer
Copy link
Contributor

TomasHubelbauer commented Sep 21, 2024

I am making ample use of the VS Code local workspace extensions feature shipped in v1.89:
https://code.visualstudio.com/updates/v1_89#_local-workspace-extensions

Whenever I make a chance to the extension's source, I have to use the Developer: Reload Window command to make it update.
I think the Reload Extensions button that is in the Extensions pane whenever I install or uninstall extension would also result in the same effect, but that button's underlying action is not exposed as a command that could be found via the command palette AFAIK.

I would like to propose a built-in file save monitor (only when saving a text editor in VS Code not a general file system watcher) that would detect whether the changed file belongs to a directory or a subdirectory of any local workspace extension (extensionPath in the vscode.extensions API) and reload the extension whenever such a file was changed.

I believe something like this could be also crudely done as an extension itself vscode.commands.executeCommand running the workbench.action.restartExtensionHost command based on vscode.workspace.onDidSaveTextDocument with the downside that it could only reload all extensions this way, not any particular one, so I think a built-in solution would be preferred.

TomasHubelbauer pushed a commit to TomasHubelbauer/vscode-extension-playground that referenced this issue Sep 21, 2024
@RedCMD
Copy link
Contributor

RedCMD commented Sep 21, 2024

related: #226511

@sandy081 sandy081 added feature-request Request for new features or functionality extensions Issues concerning extensions labels Sep 23, 2024
@sandy081 sandy081 added this to the Backlog milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants