This tutorial introduces you to using Google Chrome's built-in Developer Tools to interactively debug an extension.
To follow this tutorial, you need the Hello World extension that was featured in Getting Started. In this section, you'll load the extension and take a look at its information in the Extensions page.
      Load the Hello World extension if it isn't already running.
      If the extension is running,
      you'll see the Hello World icon
       to the right of
      your browser's address bar.
      to the right of
      your browser's address bar.
    
If the Hello World extension isn't already running, find the extension files and load them. If you don't have a handy copy of the files, extract them from this ZIP file. See Getting Started if you need instructions for loading the extension.
As long as your browser is in Developer mode, it's easy to inspect popups.
 and choose the Inspect popup menu item. The popup appears,
  and a Developer Tools window like the following should display the code
  for popup.html.
  and choose the Inspect popup menu item. The popup appears,
  and a Developer Tools window like the following should display the code
  for popup.html.
  
      
     
 (second
  from left,
  at the bottom of the Developer Tools window)
  so that you can see both the code and the console.
(second
  from left,
  at the bottom of the Developer Tools window)
  so that you can see both the code and the console.
  In this section, you'll follow the execution of the popup page as it adds images to itself.
   
  
> location.reload(true)
The popup page goes blank as it begins to reload, and its execution stops at line 37.
i is 0, and
  photos is a node list
  that contains at least a few elements.
  (In fact, it contains 20 elements at indexes 0 through 19,
  each one representing a photo.)
  
   
  
 (near
  the top right of the Developer Tools window)
  to go through the image-processing loop a single time.
  Each time you click that button,
  the value of
(near
  the top right of the Developer Tools window)
  to go through the image-processing loop a single time.
  Each time you click that button,
  the value of i increments and
  another icon appears in the popup page.
  For example, when i is 10,
  the popup page looks something like this:
  
   
  
 to
  continue execution.
to
  continue execution.
  This tutorial demonstrated some techniques you can use to debug your extensions:
Now that you've been introduced to debugging, here are suggestions for what to do next:
console.log() and console.error()
    in your extension's JavaScript code.
    Example: console.log("Hello, world!")
  For more ideas, see the Now what? section of Getting Started.