Skip to content

Avoiding extension host shut down on opening folder #75720

@jumattos

Description

@jumattos

I am working on a VS code extension that shows remote files. We invoke the openFolder command using our own file system provider (powered by the cloud).

The problem is that the command shuts down the extension host process. VS Code then can't find our file system provider, and the file explorer is not loaded correctly. If the user waits a couple of seconds and collapse/expand the file explorer view, the files show up as expected.

Right now, we simply reload the file explorer once the extension is up and running again. This is not ideal, since it takes quite a bit of time and doesn't prevent the failure from happening.

// The next line ensures the file explorer will be loaded correctly
vscode.commands.executeCommand('workbench.files.action.refreshFilesExplorer');

How can we work around this? Could we have the option of opening a folder without shutting down the extension host?

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugfile-explorerExplorer widget issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions