问题
I have a JavaScript file that I have blackboxed in the Chrome developer tools and I have the debugger set to pause on uncaught exceptions. However, the dev tools continues to pause on uncaught exceptions in the blackboxed JS file (see screenshot below). Is this a Chrome bug? Or is there an additional step required to make Chrome stop pausing on uncaught exceptions in blackboxed scripts?
According to https://developer.chrome.com/devtools/docs/blackboxing :
What happens when you blackbox a script?
Exceptions thrown from library code will not pause (if Pause on exceptions is enabled)
So this seems either like a bug, or I'm overlooking something obvious.
回答1:
This issue is sadly not resolved as of 70.0.3538.77. Filed this Chromium issue. The fun part? Dev Tools itself says it shouldn't stop on exceptions from blackboxed scripts - while being stopped in a blackboxed script 😂
回答2:
This issue is fixed for me on version 56.0.2924.87.
If I blackbox a script on this version, the debugger does not stop anymore on a throw statement even when"pauses on caught exceptions" is checked.
来源:https://stackoverflow.com/questions/32575631/chrome-dev-tools-pauses-on-exceptions-in-blackboxed-script