I would like to work on a website that is hosted on Github in VS Code. The issue is when I use the remote repositories extension on VSC, I can't use live server (like it won't let me and it grays out). I was wondering if there was a way to get around this or something else I can use to display my website.
I tried to use Live Server with Remote Repositories, which I thought would work, but it didn't let me use Live Server. I also tried other repository extensions which also didn't work.
I don't think this is possible right now, and I don't think it would become possible without either making significant changes to how the Live Server extension for VS Code works, or making significant changes to your workflow.
Quoting myself from my answer to Why is VS Code Live Server opening a directory instead of running the code in the browser? (emphasis added),
But from my attempt to understand the (minified) code of the extension (it's not open source) the Remote Repositories extension doesn't work by downloading the repository contents to your machine's filesystem (pretty sensible). It appears to use a combination of the GitHub GraphQL API and VS Code's
FileSystemProvider
API.So either
the Live Server extension would need to be reworked to support understanding filesystems provided by an extension through
FileSystemProvider
, which it could do through theworkspace.fs
API property, which is aFileSystem
object (I tried searching for existing issue tickets on this topic https://github.com/ritwickdey/vscode-live-server/issues?q=is%3Aissue+filesystem+is%3Aopen and didn't find any.or you need to clone the repository locally (the Remote/GitHub Repositories extension provides a command named
Continue Working On...
, which you can run from the command palette).I wrote this answer using the Remote/GitHub Repositories extension as an example, since the question focuses on that remote development extension, but the same info should be generalizable to any remote development extension that provides a "virtual filesystem" to a VS Code workspace via the
FileSystemProvider
API.