Using the Console

The console in Web Inspector lets you access and modify the DOM and JavaScript of your web application. Its methods are defined by the Console and Command Line APIs.

Open the Console

You can access the console through the Console panel or as a split-screen view in the other panels.

  • To open the Console panel, click the Console icon in the top toolbar.
  • To open the split-screen Console view in another panel, click Console Split-view Icon in the bottom toolbar.

Use the Console to inspect DOM elements

The console in Web Inspector lets you inspect DOM elements and objects. Use the inspect() function to open and select the specified element or object in either the Elements panel or Profiles panel respectively.

  1. Open the Elements panel and click the Show/hide Console split-view button (Console Split) in the bottom toolbar.
  2. Select the element you want to inspect using $(selector).
  3. Pass the last evaluated expression property ($_) to the inspect() function.
Screen showing a div element being inspected in the Console.

To learn more about the Console, and view the Console and Command Line API reference guides, visit Chrome Developer Tools Guide.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus