The Console defaults to the top context, unless you access DevTools by inspecting an element within another context. For example, if you inspect a element within an, then DevTools sets the Execution Context Selector to the context of that.
Processing The following revision refers to this bug: - 2010-07-16 04:58:48 -0700 (Fri, 16 Jul 2010) 11 lines Changed paths: M M M M M M A M M M M M M M M M Add 'Inspect Element' shortcut to browser tabs. If the DevTools window is closed, it gets opened, and the Inspect Element tool is enabled. If the DevTools window is opened, the inspected tab remains focused with the Inspect Element tool enabled. If the Inspect Element tool is enabled, it gets turned off. The shortcut is Ctrl-Shift-C for Win/Linux, Cmd-Shift-C for Mac BUG= TEST=manual Review URL. Processing As a few have pointed out, this does not work as spec'ed: 'If the DevTools window is closed, it gets opened, and the Inspect Element tool is enabled.
If the DevTools window is opened, the inspected tab remains focused with the Inspect Element tool enabled. If the Inspect Element tool is enabled, it gets turned off.' When using the shortcut: If the DevTools window is Opened BUT NOT FOCUSED in some way, the DevTools are closed. Try it - hit the shortcut, you're inspecting. This works, until you interact with the page in some way. THEN, the next time you hit the shortcut. This is so tedious, I can't believe it's still broken.
Try the same thing in Firefox/Firebug and you will see how it should work. Shift-control-C should toggle INSPECTING; it should not close the dev window. If you only inspect once in a while, for a short time, this is fine behavior, but for an actual web developer, working on a site, with the DevTools window basically open all the time, the current behavior is maddening.
![Shortcut Key For Inspect Element In Chrome Mac Shortcut Key For Inspect Element In Chrome Mac](/uploads/1/2/5/5/125594043/364018751.png)
Yes, I’ve been a little (understatement) bummed about that. Sure, it’s great that you can open it. But why provide a shortcut to open it and then forget to include one for closing it? I think it’s the least one would expect good ol Apple to remember. Next thing, of course, would be a shortcut to toggle inspection of page elements.
![Shortcut Key For Inspect Element In Chrome Mac Shortcut Key For Inspect Element In Chrome Mac](https://developers.google.com/web/tools/chrome-devtools/network-performance/imgs/network.png)
I’d pick Safari any day before Firefox for web development, if it wasn’t for this single caveat. Of course, nothing can beat Firebug in features and power, but Safari is oh so much faster to open quickly and get going with. (In my opinion, Firefox is only usable for web development, and mostly because of Firebug.
But Safari’s Web Inspector is a pretty okay substitute for meat and potatoes things.).