最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Chrome DevTools script blackboxing not working - Stack Overflow

programmeradmin2浏览0评论

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!

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!

Share Improve this question edited Dec 5, 2014 at 16:38 Herbi Shtini asked Dec 3, 2014 at 17:39 Herbi ShtiniHerbi Shtini 2,04029 silver badges34 bronze badges 6
  • 1 It has worked for me few times. But I noticed the same behavior on a script today. Weird – Germain Commented Dec 3, 2014 at 17:43
  • Having the same problem. Did you find a solution yet? – Antonio Brandao Commented Jan 7, 2016 at 15:59
  • 1 I'm pretty sure something broke recently in Chrome – Simon_Weaver Commented Feb 18, 2016 at 23:47
  • @AntonioBrandao i could'nt find anything helpful, i lost interest and i just stopped using it – Herbi Shtini Commented Feb 21, 2016 at 21:51
  • Just tested it again and can confirm that it is still not working as expected on chrome 52 on Windows 7. The documentation has also moved. – TW80000 Commented Aug 18, 2016 at 0:18
 |  Show 1 more comment

3 Answers 3

Reset to default 2

I had the same issue. One quick and easy way is to look at your Call Stack. As a for instance, Right-Click on one of the 'jquery' functions and select 'black box' from the menu. Nothing else needed. In this example jquery.js will be step-over from that point on.

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.

Had the same issue and used good old

have you tried turning it off and on again?

Go to developer tools settings -> Blackboxing -> Remove all entries one by one + disable Blackbox content scripts

Blackboxed again and after that this works fine.

发布评论

评论列表(0)

  1. 暂无评论