Skip to content

Instantly share code, notes, and snippets.

@thermistor
Forked from paulirish/readme.md
Last active August 29, 2015 14:16
Show Gist options
  • Save thermistor/c1781c46366e4b5a91c4 to your computer and use it in GitHub Desktop.
Save thermistor/c1781c46366e4b5a91c4 to your computer and use it in GitHub Desktop.

Revisions

  1. @paulirish paulirish revised this gist Feb 27, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,9 @@ I've heard this before:

    > What I really get frustrated by is that I cannot wrap `console.*` and preserve line numbers
    We enabled this via [blackboxing](https://developer.chrome.com/devtools/docs/blackboxing) a [bit ago](https://code.google.com/p/chromium/issues/detail?id=267592#c36).
    We enabled this in Chrome DevTools via [blackboxing](https://developer.chrome.com/devtools/docs/blackboxing) a [bit ago](https://code.google.com/p/chromium/issues/detail?id=267592#c36).

    If you blackbox the script file the contains the console log wrapper, the script location shown in the console will be corrected to the original source file and line number. And then the source is a click away
    If you blackbox the script file the contains the console log wrapper, the script location shown in the console will be corrected to the original source file and line number. Click, and the full source is looking longingly into your eyes.


    You can try it out here: http://plnkr.co/edit/3wg4u9HUGXfFH0U7MR7j
  2. @paulirish paulirish revised this gist Feb 27, 2015. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    I've heard this before:

    > What I really get frustrated by is that I cannot wrap console.* and preserve line numbers
    > What I really get frustrated by is that I cannot wrap `console.*` and preserve line numbers
    We enabled this via [blackboxing](https://developer.chrome.com/devtools/docs/blackboxing) a [bit ago](https://code.google.com/p/chromium/issues/detail?id=267592#c36).

    @@ -13,7 +13,8 @@ You can try it out here: http://plnkr.co/edit/3wg4u9HUGXfFH0U7MR7j

    ### Blackbox the source file:
    ![image](https://cloud.githubusercontent.com/assets/39191/6423072/5ff2ead8-be95-11e4-87ba-0e5902d1bb0e.png)
    You can right-click the file in the editor, as well.

    You can right-click the file in the editor, as well. Or blackbox via regex in Settings.

    ### Logs will be resolved back to their call frame.
    ![image](https://cloud.githubusercontent.com/assets/39191/6423146/9d9426c6-be96-11e4-8fa3-be98171b5d26.png)
  3. @paulirish paulirish revised this gist Feb 27, 2015. 1 changed file with 19 additions and 7 deletions.
    26 changes: 19 additions & 7 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,31 @@
    ## console.log wrap resolving for the console
    ## console.log wrap resolving for your wrapped console logs

    I've heard this before:

    > What I really get frustrated by is that I cannot wrap console.* and preserve line numbers cross-browser.
    > What I really get frustrated by is that I cannot wrap console.* and preserve line numbers
    We enabled this via [blackboxing](https://developer.chrome.com/devtools/docs/blackboxing) a [bit ago](https://code.google.com/p/chromium/issues/detail?id=267592#c36).
    We enabled this via [blackboxing](https://developer.chrome.com/devtools/docs/blackboxing) a [bit ago](https://code.google.com/p/chromium/issues/detail?id=267592#c36).

    If you blackbox the script file the contains the console log wrapper, the script location shown in the console will be corrected to the original source file and line number. And then the source is a click away

    If you blackbox the script file the contains the console log wrapper, the stack will be corrected in what is outputted to the console.

    You can try it out here: http://plnkr.co/edit/3wg4u9HUGXfFH0U7MR7j

    ### Screenshots:
    ### Blackbox the source file:
    ![image](https://cloud.githubusercontent.com/assets/39191/6423072/5ff2ead8-be95-11e4-87ba-0e5902d1bb0e.png)
    ![image](https://cloud.githubusercontent.com/assets/39191/6423073/629efb00-be95-11e4-8fa3-47512a05895d.png)
    You can right-click the file in the editor, as well.

    ### Logs will be resolved back to their call frame.
    ![image](https://cloud.githubusercontent.com/assets/39191/6423146/9d9426c6-be96-11e4-8fa3-be98171b5d26.png)


    FWIW, Blackboxing does a lot. Blackboxing a file means:

    * 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.

    Read more about it over at https://developer.chrome.com/devtools/docs/blackboxing

    Thanks [crbug/249575](https://code.google.com/p/chromium/issues/detail?id=249575#c16)
    Cheers and thanks [crbug/249575](https://code.google.com/p/chromium/issues/detail?id=249575#c16)
  4. @paulirish paulirish revised this gist Feb 27, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ If you blackbox the script file the contains the console log wrapper, the stack

    You can try it out here: http://plnkr.co/edit/3wg4u9HUGXfFH0U7MR7j

    Screenshots:
    ### Screenshots:
    ![image](https://cloud.githubusercontent.com/assets/39191/6423072/5ff2ead8-be95-11e4-87ba-0e5902d1bb0e.png)
    ![image](https://cloud.githubusercontent.com/assets/39191/6423073/629efb00-be95-11e4-8fa3-47512a05895d.png)

  5. @paulirish paulirish revised this gist Feb 27, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ We enabled this via [blackboxing](https://developer.chrome.com/devtools/docs/bla

    If you blackbox the script file the contains the console log wrapper, the stack will be corrected in what is outputted to the console.

    You can try it out hereL: http://plnkr.co/edit/3wg4u9HUGXfFH0U7MR7j
    You can try it out here: http://plnkr.co/edit/3wg4u9HUGXfFH0U7MR7j

    Screenshots:
    ![image](https://cloud.githubusercontent.com/assets/39191/6423072/5ff2ead8-be95-11e4-87ba-0e5902d1bb0e.png)
  6. @paulirish paulirish created this gist Feb 27, 2015.
    19 changes: 19 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    ## console.log wrap resolving for the console

    I've heard this before:

    > What I really get frustrated by is that I cannot wrap console.* and preserve line numbers cross-browser.
    We enabled this via [blackboxing](https://developer.chrome.com/devtools/docs/blackboxing) a [bit ago](https://code.google.com/p/chromium/issues/detail?id=267592#c36).

    If you blackbox the script file the contains the console log wrapper, the stack will be corrected in what is outputted to the console.

    You can try it out hereL: http://plnkr.co/edit/3wg4u9HUGXfFH0U7MR7j

    Screenshots:
    ![image](https://cloud.githubusercontent.com/assets/39191/6423072/5ff2ead8-be95-11e4-87ba-0e5902d1bb0e.png)
    ![image](https://cloud.githubusercontent.com/assets/39191/6423073/629efb00-be95-11e4-8fa3-47512a05895d.png)



    Thanks [crbug/249575](https://code.google.com/p/chromium/issues/detail?id=249575#c16)