how to edit Javascript in Html in Chrome Dev Tools

kevin_chen picture kevin_chen · Mar 30, 2017 · Viewed 12.2k times · Source

We can edit and execute JavaScript code from the *.js file in the Sources panel of Chrome DevTools. However, if the js code comes from the *.html file, how can we edit and execute them besides adding breakpoints?

Answer

Molik Miah picture Molik Miah · Mar 30, 2017

In Chrome Dev Tools you can setup a 'workspace' and when you make changes to a file it will save locally and also show changes in the browser.

Please follow this Google guide on setting it up. It's easy to follow and with screenshots, if you need further help then please message back.

Link with instructions: https://developers.google.com/web/tools/setup/setup-workflow