mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Add Pause JavaScript From The Source DevTools Panel as a Chrome TIL
This commit is contained in:
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
|
||||
|
||||
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
|
||||
|
||||
_1244 TILs and counting..._
|
||||
_1245 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -89,6 +89,7 @@ _1244 TILs and counting..._
|
||||
- [Duplicate The Current Tab](chrome/duplicate-the-current-tab.md)
|
||||
- [Easier Access To Network Throttling Controls](chrome/easier-access-to-network-throttling-controls.md)
|
||||
- [Keybinding To Focus The Address Bar](chrome/keybinding-to-focus-the-address-bar.md)
|
||||
- [Pause JavaScript From The Source DevTools Panel](chrome/pause-javascript-from-the-source-devtools-panel.md)
|
||||
- [Navigate The Browser History With Vimium](chrome/navigate-the-browser-history-with-vimium.md)
|
||||
- [Pretty Print Tabular Data](chrome/pretty-print-tabular-data.md)
|
||||
- [Reference The Selected Node](chrome/reference-the-selected-node.md)
|
||||
|
||||
20
chrome/pause-javascript-from-the-source-devtools-panel.md
Normal file
20
chrome/pause-javascript-from-the-source-devtools-panel.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Pause JavaScript From The Source DevTools Panel
|
||||
|
||||
You know that moment when you accidentally introduce an infinite loop in some
|
||||
JavaScript code. You've just refreshed the page in the browser and everything
|
||||
seems to both hang and loop. And the browser slows to a crawl.
|
||||
|
||||
If you're trying to get to the bottom of things, you may be `console.log`'ing
|
||||
some data points. However, because of the infinite loop, the logs are flying by
|
||||
in the console. It would be great if you could bring things to a halt.
|
||||
|
||||
I assume you already have devtools open, since you're looking at the logs. If
|
||||
not, hit `F12`.
|
||||
|
||||
Then go to the _Sources_ tab which is where the JavaScript debug tools are
|
||||
located. From here, you can find and click the pause button. It should be the
|
||||
first in the panel of debug controls. Alternatively, as long as you have the
|
||||
_Source_ tab in focus, you can simply hit `F8`.
|
||||
|
||||
Once you've paused that infinite loop, you can go back to the console and have
|
||||
a look around.
|
||||
Reference in New Issue
Block a user