Reputation: 1189
I am using Visual studio code for front end works. How can we launch Chrome or any browsers in debugging mode or run the html file from Visual Studio Code?
Upvotes: 13
Views: 69329
Reputation: 9
On a MacBook Pro, I right-click on the index.html file and select Open With Live Server open with live server in vscode
Upvotes: 0
Reputation: 21
You can use Live Server on Visual Studio Code https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer
Upvotes: 2
Reputation: 11
I can answer how you can debug Javascript code in Visual studio code. You just need to add debug point in front of the line number by mouse click. It will add the redpoint there. Then you can go to Debug menu->Start debugging it will launch the browser and your JS code will run in debug mode. Hope this answers your query.
Note: You need Debugger for Chrome extension to do that for chrome. For other browsers like firefox add Debugger for Firefox extension.
Upvotes: 1
Reputation: 8443
For Chrome debugging, I installed this extension
https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome
For opening html file in browser, I installed this extension
https://marketplace.visualstudio.com/items?itemName=techer.open-in-browser
Upvotes: 17