question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I Can't Get Live Server to Work On MacBook

See original GitHub issue

I’m submitting a…

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ X] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

I am new to Visual Studio Code and to writing code. VSC is working perfectly. Sadly, after installing and activating the Live Server extension I get an error when trying to start it in a browser. The error message is: Open a folder or workspace… (File -> Open Folder) All I am doing is working on HTML and CSS. If I open the HTML page in Chrome, I can update it by using cmd tab and cmd r.

I uninstalled the extension and updated the version of VSC. I then reinstalled the LS extension and get exactly the same result.

Expected behavior

The VSC HTML page I’m working on would open in Chrome and instantly update as I make changes.

Environment

Browser:

- [X ] Chrome (desktop) Version 69.0.3497.81 (Official Build) (64-bit)
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:

- Live Server: 5.1.1
- Platform:  Mac OS High Sierra version: 10.13.6
- Visual Studio Code: Version 1.27.1 (1.27.1)

Others

I tried installing another extension: Live Server Preview 0.1.2 and couldn’t get this to work either. I have also searched YouTube and GIT for a solution but had no luck.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

18reactions
vstegencommented, Sep 13, 2018

The extension won’t work if you only have a file open. Use ‘File -> Open Folder’ in VSCode to open the directory your files are in. Then open the respective HTML file. You can start Live Server now and it should work.

3reactions
js76155commented, Sep 13, 2018

You are quite correct. IT WORKS!! Thank you for providing this simple yet effective solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Visual Studio Code Live Server Not Working? - YouTube
Live Server extension works fine with most of the machines but some of you might face an issue, it's not working perfectly on...
Read more >
Visual Studio Code Live Server Not Working - freeCodeCamp
Set the browser for Live Server​​ First, open the Command Pallete with F1, then type in Preferences: Open Settings (JSON) and select that...
Read more >
Live server installed but not working in VS code - Stack Overflow
I had this problem and I solved it by changing the port number in the settings.json file to an opened one. To get...
Read more >
How to Run HTML in VSCode on a Mac (Localhost ... - YouTube
... in vscode on Mac 00:15 How to run Live Server in vscode 00:34 Go to extensions in vs code 00:40 Type Live...
Read more >
How to Set Up a Local Live Server in Visual Studio Code
Go to the VS Code Marketplace tab (Mac shortcut: CMD + Shift + X), search for Live Server, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found