Isak
Isak

Reputation: 578

Does the VS Code Live Share extension have integration with the Live Server extension?

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.

Upvotes: 12

Views: 20140

Answers (2)

starball
starball

Reputation: 50496

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.

Upvotes: 2

Ihab
Ihab

Reputation: 51

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.

img

Upvotes: 5

Related Questions