localhost refused to connect | VS code error for HTML

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello people i hope everyone is doing well today i will be solving one common problem every visual studio code user had faced every learner who is doing the programming in html may have faced one problem during running and debugging i hope you are pretty familiar with this image once in a while you may have faced an error saying locale host refused to connect or locale host error what i meant is your html file may not be opening in chrome so there can be three solutions please follow every solution i am pretty sure one of them will work first one go to the run and debug section you will see the green button section press that area and you will see the add configuration section press it and it will take you to the launch json file here you may see a similar configuration first check the port for locale host for me it is 8 080. to check the localhost port click add configuration and click launch chrome then you can see the port address [Music] save and check then run the file [Music] if it still doesn't work then copy everything from mine but remember to place the address of the main html file you want to run since my main html file is the index.html i am putting the address of the index.html file then again save and run [Music] again if this does not work then at last this step will work probably go to the current directory you are working [Music] then look for this file then delete it [Music] come to the vs code then go to the same run and debug section [Music] and then click there you will create a launch.json file press it and save it now you are ready to go [Music] or you can do is you can press the go live option at the bottom right corner thank you so much people if it helped press that like button [Music] you
Info
Channel: Nikesh Dhakal
Views: 287,031
Rating: undefined out of 5
Keywords: #VSCode #HTML #localhost #error
Id: 4O-NjurMP6w
Channel Id: undefined
Length: 3min 22sec (202 seconds)
Published: Sat Sep 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.