New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 632513 link

Starred by 25 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

DevTools: improve way to mark blackboxed source

Project Member Reported by kozyatinskiy@chromium.org, Jul 28 2016

Issue description

There are two methods to blackbox source in DevTools:
- set pattern for source url in settings;
- blackbox current file by url.

We can improve this behavior.
Existing suggestions:
- add way to blackbox anonymous script,
- add script whiteboxing (can be emulated with regex for pattern),
- accept server generated list of blackboxing scopes.
- add a way to temporary disable blackboxing.
 
Cc: kozyatinskiy@chromium.org paulir...@chromium.org
 Issue 485954  has been merged into this issue.
Description: Show this description
 Issue 531726  has been merged into this issue.
Description: Show this description
Cc: dgozman@chromium.org pfeldman@chromium.org
 Issue 526239  has been merged into this issue.
 Issue 543000  has been merged into this issue.
Description: Show this description
Cc: -kozyatinskiy@chromium.org
"anonymous script" - I assume those contained in debugger:///VM...

Does it include anonymous function calls like these too?
setInterval(function() {/*Very noisy anonymous function*/}, 10);

Have there been any talk about granular blackbox support?
ex 1:
setInterval(function() {/*this function*/}, 10);
But allow other functions called by setInterval

ex 2a:
function annoyingFunction() {/*this function*/}

ec 2b:
Blackbox setInterval(...)


What about exclusive whiteboxing, blackbox everything except X.
Is there an update to this issue?  My large dev team uses frameworks which lead to creation of these anonymous VM scripts.  We'd love to be able to blackbox these.  Is there any way to raise the severity of this issue to see if we couldn't get more minds on finding a solution to this?  Looks like there are others seeking a solution to this as well via: https://stackoverflow.com/questions/29897750/is-it-possible-to-blackbox-all-vm-scripts-in-chrome-debugger
#10 - a workaround can be to override eval in your page
(function ()
 {
  var originalEval = eval;
  eval =
   function (script)
   {
    return originalEval(script + "\n//# sourceURL=blackbox-this.js");
   }
 }());
And then blackbox ^.*blackbox-this.js$

Does that work for you?
Same for setInterval/setTimeout when it gets a string (but that is a bad practice anyway, right? ;)
Owner: kozy@chromium.org
I would very much like a whiteboxing option.  Basically, blackbox everything *except* folder X.

Also, the disable/enabled dropdown should be a checkbox that doesn't require me to enter "edit mode" for that line.

Lastly, can you improve the documentation on the flavor of regex that you are using.  I tried to make my own whiteboxing by making a javascript flavored regex. Example:

^(?!(file:\/\/\/Users\/me\/myprojects\/mywebsite\.com\/app\/)).*$

But the negative lookahead doesn't seem to be supported.  You could eliminate the need for whiteboxing if you just had full regex support and better documentation.

Thanks for the awesome feature though!  Looking forward to it getting better.

Comment 15 by kozy@chromium.org, Dec 5 2017

Cc: kozy@chromium.org brajkumar@chromium.org
 Issue 779338  has been merged into this issue.
For some reason, 779338 was merged into this issue, even though it isn't the same at all. I would have thought it would be possible to easily change the wording on the menu so that the user doesn't think it applies to the currently highlighted function. Anyway, perhaps, when implementing the feature, you can fix the menu too.

Sign in to add a comment