||DevToolsShim is a singleton that provides a set of helpers to interact with DevTools,
that work whether Devtools are enabled or not.
It can be used to start listening to devtools events before DevTools are ready. As soon
as DevTools are ready, the DevToolsShim will forward all the requests received until
then to the real DevTools instance.
||This XPCOM component is loaded very early.
Be careful to lazy load dependencies as much as possible.
It manages all the possible entry points for DevTools:
- Handles command line arguments like -jsconsole,
- Register all key shortcuts,
- Listen for "Browser Tools" system menu opening, under "Tools",
- Inject the wrench icon in toolbar customization, which is used
by the "Browser Tools" list displayed in the hamburger menu,
- Register the JSON Viewer protocol handler.
- Inject the profiler recording button in toolbar customization.
Only once any of these entry point is fired, this module ensures starting
core modules like 'devtools-browser.js' that hooks the browser windows
and ensure setting up tools.