How to use VScode live server when you are working on XAMPP?

Viewed 3197

Recently, I was working with XAMPP and now when I'm trying to open my html code with VScode live server, it shows the listing directory of XAMPP htdocs. What should I do?

1 Answers
  1. Open your project in VS Code and click on Go Live from StatusBar to turn on/off the server.
  2. Right click on a HTML file from Explorer Window & click to Open with Live Server.
  3. Open a HTML file and Right click on the editor and choose the options.

if you don't have have any .html or .htm file in your project then you have these steps:

  1. Hit (alt+L, alt+O) to Open the Server and (alt+L, alt+C) to Stop the server (You can change the shortcut form keybinding). [On MAC, cmd+L, cmd+O and cmd+L, cmd+C]
  2. Press F1 or ctrl+shift+P and type Live Server: Open With Live Server to start a server or type Live Server: Stop Live Server to stop a server.

I hope this will resolve your issue.

Related