Skip to content

Web extension host debug adapters not working with codespaces/github.dev #171991

@thegecko

Description

@thegecko

Does this issue occur when all extensions are disabled?: No - debug adapter required :)

  • VS Code Version: VSCode for Web 1.74.3
  • OS Version: Codespaces / github.dev (in Chrome)

As raised on the GitHub discussions, browser-based debug adapters running in the web extension host have stopped working on Codespaces and github.dev due to the file scheme not being handled correctly.

It's not clear if this a codespace issue or VS Code issue, so have raised the issue in both places.

Steps to Reproduce:

To recreate this, install the mock-debug extension in the web extension host of the VSCode for web flavours and observe the differences:

vscode.dev
The debugger runs in the browser and accesses files using the browser filesystem API. All works as expected.

@vscode/test-web
This runs on a developer's machine and I believe should mimic how codespaces/github.dev work. This works as expected.

github.dev
The debugger fails when setting breakpoints or opening files with:

Uncaught (in promise) Error (FileSystemError): Unable to read file '/vscode-vfs://github%2b7b2276223a312c22726566223a7b2274797065223a362c226964223a226d61696e227d7d/arm-debug/mock-debug/readme.md' (Unavailable (FileSystemError): Error: No file system handle registered (/vscode-vfs:/))

codespaces
You must ensure mock-debug is installed "Locally" in the web extension host, (by default it is installed in the codespace host and will work correctly) by modifying the settings:

{
    "remote.extensionKind": {
        "ms-vscode.mock-debug": [
            "ui"
        ]
    }
}

In the web extension host, similar errors are seen as github.dev:

Uncaught (in promise) Error (FileSystemError): Unable to read file '/workspaces/mock-debug/readme.md' (Unavailable (FileSystemError): Error: No file system handle registered (/workspaces))

Unfortunately codespaces and github.dev are also the only environments you cannot sideload or debug extensions in, so debugging this issue is extremely challenging.

I've tried reformatting paths prepending vscode-remote:// and variations on the root fspath but this doesn't work.

How should a debug adapter format paths so they can be opened by the UI in codespaces/github.dev when the scheme and authority aren't present?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions