Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome Dev Tools - Can you undo changes in the console?

If you enter a command in Chrome Dev tools (which could be one big block of code) and hit enter, is there a way to "undo" changes made to the DOM? Or do you simply have to refresh the page?

like image 350
docta_faustus Avatar asked Jul 24 '15 20:07

docta_faustus


People also ask

What is the purpose of the Console tab in Chrome DevTools?

Another key function of the console is that it allows the developer to inspect the code and interact with it while executing. In the DevTools Sources tab you can find all the source files of your application and apply breakpoints³ to pause the execution.


1 Answers

I too was looking for an answer to this question beyond "refresh the page"... Stumbled across this solution:

  1. Enter Chrome dev tools (CMD + Shift + I on Mac)

  2. Click the three dots aligned vertically to get the settings menu

  3. Hover over "More Tools" then go to "Changes"

  4. On the changes window you can see all the changes made during your current DOM editing session - to revert them all, simply click the undo arrow in the bottom left...

See the visual below

Reset all changes made in Chrome dev tools

like image 158
Anthony Lavall Avatar answered Oct 05 '22 03:10

Anthony Lavall