Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome DevTools script blackboxing not working

I am trying to use the new feature of chrome devtools "blackboxing a script".
This Chrome Devtools article lists script blackboxing functionality

What happens when you blackbox a script?

  • Exceptions thrown from library code will not pause (if Pause on exceptions is enabled)
  • Stepping into/out/over bypasses the library code
  • Event listener breakpoints don't break in library code
  • The debugger will not pause on any breakpoints set in library code.

The end result is you are debugging your application code instead of third party resources.

I have tried to blackbox the file directly by right clicking the file from source tab and everything goes right the yellow notification shows at the top of file "This script is blackboxed in debugger". Strangely none of the above listed points work, debugger goes through blackboxed script also event listeners reference the blackboxed script. I have also enabled Developer Tools experiments at chrome://flags/
With these options set i thought i would have been ok, i also have the latest chrome at this time 39.0 beta,i have no idea what i'm missing. Did anybody go through this?
Thnx!

enter image description hereenter image description here

like image 383
Herbi Shtini Avatar asked Dec 03 '14 17:12

Herbi Shtini


People also ask

Can you debug Node JS application in Chrome DevTools How?

Using Google Chrome DevTools to Debug The next step is to head to Chrome, open a new tab, and enter the URL chrome://inspect/ . Click on “Open dedicated DevTools for Node” to start debugging the application. It will take a couple of seconds to view the source code in Chrome DevTools.

How do I add a conditional breakpoint in DevTools?

Add a conditional breakpoint by right clicking a line number, selecting Add Conditional Breakpoint , and entering an expression. Note: Because the conditional breakpoint simply evaluates an expression, you can add useful logging statements within the expression.

What is “blackboxing” in Chrome DevTools?

You’re happy man if you use Chrome DevTools (if you don’t, you definitely should try ). There is a cool feature called “Blackboxing”. Blackboxing gives you a way to denote library code so that the debugger can route around it. When you blackbox a source file, the debugger will not jump into that file when stepping through code you’re debugging.

What does it mean to BlackBox a source file?

When you blackbox a source file, the debugger will not jump into that file when stepping through code you’re debugging. There is a cool article about blackboxing on Chrome Developer Tools site.

How do I add a blackbox to a script?

Blackbox a script from Settings #. 1 Open Settings. 2 Go to the Blackboxing tab. 3 Click Add pattern. 4 Enter the script name or a regex pattern of script names to blackbox. 5 Click Add.

What is blackboxing in Visual Studio Code?

Blackboxing gives you a way to denote library code so that the debugger can route around it. When you blackbox a source file, the debugger will not jump into that file when stepping through code you’re debugging.


1 Answers

In your screenshot, I can see a breakpoint.

If you put a breakpoint, it will always break (except if you deactivate it, of course), even with blackboxing being active.

like image 108
avetisk Avatar answered Oct 16 '22 17:10

avetisk