title: console.log - Chrome extension doesn't execute console.log, it just skips console.log
body: <p>My Chrome extension doesn't seem to execute <code>console.log</code> in any way. It skips it.</p>
  
  <p><code>console.log</code> works: I can open the Console, type <code>console.log('test');</code> and it works. It works from other scripts, i.e. a JS script loaded in a HTML page locally, but not from my extension.</p>
  
  <p>My <code>background.js</code> that I run through <code>manifest.json</code> below. It executes <code>alert()</code>, but not <code>console.log</code></p>
  
  <pre><code>chrome.browserAction.onClicked.addListener(function(tab) {
    chrome.tabs.executeScript(null, { file: "jquery-3.0.0.min.js" }, function() {
  
        console.log('----');
  
        alert('Hello!);
  
    });
  });
  </code></pre>
  
  <p>I've tried:</p>
  
  <ul>
  <li><code>delete console.log</code>, <code>delete window.console</code> and <code>delete window[console]</code> as suggested by <a href="https://stackoverflow.com/questions/7089443/restoring-console-log/7089671#7089671">Restoring console.log()</a> and <a href="https://stackoverflow.com/questions/8080610/javascript-console-log-in-magento/21954826#21954826">JavaScript console log in Magento</a>, but no success.</li>
  <li>loaded the extension in Incognito mode, with no other extensions loaded, but no success.</li>
  <li>updated <code>background.js</code> to consist of only a single line - <code>console.log('----');</code> - still doesn't work.</li>
  <li>making sure that the console reports "All", not just errors.</li>
  </ul>
  
  <p>My <code>manifest.json</code>:</p>
  
  <pre><code>{
  
    "manifest_version": 2,
  
    "name": "My Chrome Extension",
    "description": "This extension will you save time.",
    "version": "1.0",
  
    "permissions": [
      "http://*/*",
      "https://*/*",
      "tabs"
    ],
  
    "browser_action": {
      "name": "Click to start the extension"
    },
  
    "background": {
      "scripts": ["background.js"]
    }
  
  }
  </code></pre>