This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* GlobalsDebugger | |
* | |
* Inspect the stack when a global variable is being set on the window object. | |
* Given a global variable name, it proxies the variable name in the window | |
* object adding some custom code that will be invoked whenever the variable | |
* is set. The custom code will log the current stack trace and halt the code | |
* execution to allow inspecting the stack and context in your browser DevTools. | |
* You can use the "globalsToInspect" query-parameter to set a comma-separated | |
* list of names of the variables you want to inspect. |