OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to access add-on content script in Firefox console?

  • Thread starter Thread starter zhm
  • Start date Start date
Z

zhm

Guest
I have developed an add-on for Firefox and Chrome. It has content scripts. I want to access them in the browser tab's console (on Firefox the Web Console). For example, I want to enter a global variable defined in the content script(s) in the console, and it will output its value.

In Chrome, I can open the console by pressing F12, then navigate to the Console tab in the developer tools. It has a dropbox, right after the filter button, to select which context I am in (page/content script):

tXP9N.png


In Firefox, how to do the same thing?

<p>I have developed an add-on for Firefox and Chrome. It has content scripts. I want to access them in the browser tab's console (on Firefox the <a href="https://developer.mozilla.org/en-US/docs/Tools/Web_Console" rel="noreferrer">Web Console</a>). For example, I want to enter a global variable defined in the content script(s) in the console, and it will output its value.</p>

<p>In Chrome, I can open the console by pressing <kbd>F12</kbd>, then navigate to the Console tab in the developer tools. It has a dropbox, right after the filter button, to select which context I am in (page/content script):</p>

<p><img src="https://i.sstatic.net/tXP9N.png" alt=""></p>

<p>In Firefox, how to do the same thing?</p>
 

Latest posts

Top