Skip to content

Allow to open editor URL via WSL #775

@flyingangel

Description

@flyingangel

At the moment we can open the editor directly using a protocol. Ex: vscode://file/%file:%line

If we use PrettyPageHandler::setEditor(EDITOR_VSCODE)

This only allow us to open a file in local machine.

But if we want to open a file inside a WSL container (while VSCode is on Windows system), we would need to improve the protocol to become:

vscode://vscode-remote/wsl+Ubuntu/%file:%line

The general supported format is:

vscode://vscode-remote/<remote-type+identifier>/<path>:<line>

So we would need to add an additional config for the remote setting. Ex:

PrettyPageHandler::setEditor(EDITOR_VSCODE_REMOTE)
PrettyPageHandler::setEditorRemoteType('wsl+Ubuntu')

Ubuntu can be fetched from env variable $WSL_DISTRO_NAME if we want to guess automatically if the type is wsl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions