6

I makes a React mistake, alright I is fool.

I caused an endless loop, but Chrome won't let me diagnose it, because when you have an endless loop, you can't close the tab, can't open devtools, can't debug to find the source.

Comments
  • 1
    Delete the endless loop before npm install? You forget where you out that endless loop? Version control?
  • 1
    Right click title bar -> task manager
    Kill tab.
  • 1
    While (code.visible && crash) { commentOutSomeCode(); }
  • 0
    @devTea the way to do it is to open a keyboard shortcut to dev tools and then pause immediately again with a shortcut.

    I don't use npm, and some bugs are very subtle to discover even in 200 lines of code given that there are change detections which proxy-invalidate normalized cache and deal with the Suspense life cycle and interdependent hook effects. Not my code base, inherited.
  • 0
    debugger statement to the rescue. Worst case scenario, you'll have to use Chrome's Task manager to kill the page, then open DevTools, then reload the page, and it will pause on that debugger statement.
Add Comment