After installing the live server preview extension on vs code, I've been trying to live preview my html AND Javascript content.
But as soon as I click on "Go live" it shows
Error on port 5500. Please try to change the port through settings or report on GitHub.
I did check the Github report , it said I should change the settings to liveServer.settings.port:0(or whatever)
but the thing is I don't really know where that setting is and how I can access it, please any help?
In your VSCode user settings add this line,
"liveServer.settings.port":8080,
For more info, you can check the Docs on GitHub
You can access your settings through File->Preferences->Settings. There you can search for the setting you'd like to change.
Open the window power shell as admin and execute the command:
command 1:netstat -ano | findstr :5500
Then, you will get a message like:
TCP 0.0.0.0:5500 0.0.0.0 #webpage name# #port_number
Afterwards, execute:
command 2:taskkill /PID port_number /F
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.