Black-boxing script option in Chrome Developer tool
There's an easier way in Chrome 60 (and possibly older):
- Open the source file in Chrome dev tools (in the source tab)
- Right Click the column that displays the line numbers
- Select "Blackbox Script"
EDIT: As svict4 pointed out, in Chrome 64, you can also right click anywhere on the script
- It seems they changed from
blackbox
toIgnore List
.
- Also press
f1
in devTools and findIgnore List
- Open devtools settings (press F1 once in devtools or open from the menu)
Go to blackboxing (see image below)
Add a pattern, for example:
node_modules
angular
rxjs
It uses regex syntax in case you need something more specific.
The nice part about blackboxing library/framework scripts is that it makes it easier to see in stacktraces from where the error was triggered in your own sources.
EDIT
As other pointed out, since this answer was posted you can directly blackbox a script with a right click on the source file in devtools. However head off to the blackboxing settings UI for more control.