Question: If I call `console.log('something');` from the popup page, or any script included off that it works fine.

However as the background page is not directly run off the popup page it is not included in the console.

Is there a way that I can get `console.log()`'s in the background page to show up in the console for the popup page?

is there any way to, from the background page call a function in the popup page?

Answer: 
Any *extension page* (except [content scripts](http://developer.chrome.com/extensions/content_scripts.html)) has direct access to the background page via [`chrome.extension.getBackgroundPage()`](http://developer.chrome.com/extensions/extension.html#method-getBackgroundPage).

That means, within the [popup page](http://developer.chrome.com/extensions/browserAction.html), you can just do:

```
chrome.extension.getBackgroundPage().console.log('foo');

```

To make it easier to use:

```
var bkg = chrome.extension.getBackgroundPage();
bkg.console.log('foo');

```

Now if you want to do the same within [content scripts](http://developer.chrome.com/extensions/content_scripts.html) you have to use [Message Passing](http://developer.chrome.com/extensions/messaging.html) to achieve that. The reason, they both belong to different domains, which make sense. There are many examples in the [Message Passing](http://developer.chrome.com/extensions/messaging.html) page for you to check out.

Hope that clears everything.
To get a console log from a background page you need to write the following code snippet in your background page background.js -

```
 chrome.extension.getBackgroundPage().console.log('hello');

```

Then load the extension and inspect its background page to see the console log.

Go ahead!!