0

Given a Chrome extension that sets up a browser_action based on a default_icon click, how can that extension print to the console? For example, say my manifest.json includes this:

{
  "name": "Testing",
  "version": "1.0",
  "browser_action": {
    "default_popup": "testing.html",
    "default_icon": "icon.png"
  },
  "manifest_version": 2
}

and my testing.html loads a <script> with some Javascript:

console.log("WHY DON'T I SEE THIS??");

Why doesn't this print anything to the console? And how might I go about getting something printed to the console?

mix
  • 6,943
  • 15
  • 61
  • 90
  • 3
    Possible duplicate of [console.log() not working when I load my chrome extension](http://stackoverflow.com/questions/36107503/console-log-not-working-when-i-load-my-chrome-extension) – Teepeemm Jun 27 '16 at 01:17
  • 2
    Silly question, but did you actually click at the browser action button? Also, don't forget that the popup window runs in a separate context and it has a separate console. Right click on browser action button and click `Inspect popup`. – Transcendental Jun 27 '16 at 14:21
  • @Transcendental Thank you very much, that is exactly what I needed. I knew it was a separate console, but I couldn't figure out how to open it. – szmate1618 Nov 13 '22 at 13:45

0 Answers0