Last active
December 16, 2015 14:19
-
-
Save harthur/5447846 to your computer and use it in GitHub Desktop.
Open a Firefox devtools window that's debugging the devtools window that's debugging the currently selected tab.
This file contains 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
/* | |
* Running this scratchpad in chrome mode will open a devtools window that's debugging | |
* the devtools window that's debugging the currently selected tab. | |
*/ | |
let {devtools} = Components.utils.import("resource:///modules/devtools/gDevTools.jsm", {}); | |
let tabTarget = devtools.TargetFactory.forTab(gBrowser.selectedTab); | |
let toolbox = gDevTools.getToolbox(tabTarget); | |
let win = toolbox._host.frame.contentWindow; | |
let target = devtools.TargetFactory.forWindow(win); | |
let toolbox = gDevTools.showToolbox(target, "styleeditor", "window"); |
In nightly, can run this command by:
- Tools > Web Developer > Browser Console
- Copy script above and press enter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run this, first enable chrome debugging:
true
Then open a scratchpad: