How to make a VSCode extension work with vscode-server through ssh

27 Views Asked by At

I have a custom made vscode extension built as a vscode.WebviewPanel, which works fine locally but has issues when running over ssh in vscode-server (the built-in vscode remote development thing).

To display images in the web view, I use the following in TypeScript : vscode.Uri.file(context.extensionPath + "/html/logo.svg").with({ scheme: 'vscode-resource' }).toString()

Which returns something like this : https://file%2B.vscode-resource.vscode-cdn.net/<path to extension folder>/html/logo.svg

This works fine locally but when running remote the image doesn't show and I get a broken link icone instead. The path is correct and matches where the resource is on the server side. Not sure why it's not displaying the resource. Does this need doing differently in the case of an extension running remotely ? How could I even detect that the extension is running remotely ?

What's the best way to debug this because nothing is showing in the log and I'm not sure what the problem is ?

0

There are 0 best solutions below