DEV Community

Andrew Jones
Andrew Jones

Posted on

9 2

TIL: How to pause an infinite JavaScript loop in Chrome

Today I hit an infinite loop in a React component 😅

You can stop infinite loops in chrome without force-closing the program in two ways:

One: Dev Tools

  1. Dev tools (if not already open, go View -> Developer -> Developer Tools)
  2. Sources tab
  3. Press the Pause icon ⏸ near the top right of the Sources panel

Use method two if you can’t open dev tools.

  1. Press the three vertical dots in the top right corner of Chrome
  2. Hover over “More tools...” near the mid-bottom
  3. Press “Task Manager”
  4. Select the tab you are experiencing the loop in
  5. Hit “End Process”

Hopefully this can help someone!

Top comments (1)

Collapse
 
diraskreact profile image
Dirask-React

check this article too:
dirask.com/posts/Google-Chrome-sto...

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay