Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to launch Chrome from Visual Studio code?

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?

like image 430
Adil Saju Avatar asked Oct 10 '18 10:10

Adil Saju


3 Answers

You can use Live Server on Visual Studio Code https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer

like image 137
Vegetaz Avatar answered Oct 08 '22 09:10

Vegetaz


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.

like image 38
Nilam Avatar answered Oct 08 '22 08:10

Nilam


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

like image 16
deerawan Avatar answered Oct 08 '22 09:10

deerawan