0

I'm using two js files to accomplish a task for a chrome extension.

In background.js, I have the following line of code that calls another js file: chrome.tabs.executeScript(tabId, {file: "src/bg/sidebar.js"});

When I run the extension, the script in sidebar.js appears to run, but the console does not display the log. The console does display all logs from the background.js. Does anyone know why this is happening?

2
  • Logs from content scripts will be displayed on the console of the tab where you injected the script. Commented Oct 15, 2014 at 0:02
  • thanks! both comments were on point. Commented Oct 15, 2014 at 0:18

1 Answer 1

0

As @rsanchez and @xan said, the content script logs to the console of the tab where I injected the script. I found this by viewing View -> Developer -> JavaScript Console.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.