We are using VS Live Share inside Visual Studio Code and the person who joined cannot open a shared HTML file with the Live Server extension. It says: "Cannot GET .../index.html". Does Live Server only work with "local files"? There is also no option to open the shared HTML file in the file system and to open it that way.
Asked
Active
Viewed 1.3k times
2 Answers
3
1-press the live share extension icon in the sidebar.
2-inside session details hover over shared servers sub-category.
3-an electrical plug with a green plus sign will show, press on it and an input field will pop up.
4-inside the input field write your localhost port like this e.g: localhost:5500 and press enter.
you can find the number of your port from the bottom right of vs code if you have a live server running. it will look like this: Port:5500.
once you do this a notification will automatically show in your partner's vs code to open the shared live server.
-
1can guest run code and make a server independiently of host? I mean this is kind of annoying because guests only can run server when hosts server is on. This makes live share useless. – EthernalHusky Oct 07 '20 at 23:58
-
@EthernalHusky Can you comment on this if you find something, I'm looking for the same thing. – crjase Nov 03 '22 at 05:06
0
From the changelog of the Live Server extension:
Version Date Changelog 5.2.0 16.11.2018 — [Features] Live Server + Live Share = . Share your live server over the internet with live reload feature! You'll be prompted to share live server using live server when you click to Go Live
. (Thank you so much Alex Panov for opening PR #232 )
— [Docs fixing / update] #170, #185, #201, #233 (Thanks Shaurya Shubham, Benjamin Vincent, Jan Dittrich, Karsten 7.)
See also https://github.com/ritwickdey/vscode-live-server/blob/master/src/LiveShareHelper.ts.

starball
- 20,030
- 7
- 43
- 238