Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellisense for Firefox Addon Development in VSCode

Is there a way to get Intellisense for the APIs provided by Mozilla for Firefox Addon development in VSCode?

For example, if I type browser.ta in VSCode and hit STRG+Space it should autocomplete browser.tabs.

This would make it much easier for me as a beginner to get in to Addon development.

Where I searched:

  • Stack Overflow
  • VSCode Extensions Marketplace
  • VSCode Website
  • Mozilla Docs
  • Top 10-20 Google Results for about 10 different search queries I could think of

What I have tried: Not much, because I was not able to find anything, that seemed remotely useful other than the "Debugger for Firefox" Extension for VSCode, which didn't help.

Sorry if my problem isn't described as well as it maybe should be. This is my first post to StackOverflow (because I never had a problem before, that couldn't be solved with hours googeling) and I am also new to the JS/Firefox Addon community.

like image 425
NullRef Avatar asked Feb 28 '26 07:02

NullRef


1 Answers

For everyone still struggling with this, you can create a jsconfig.json file in the root of your add-on and then add the following entry to it:

{
    "typeAcquisition": {
        "include": ["firefox-webext-browser"]
    }
}

This will add type acquisition for the browser namespace.

like image 137
Nathan Diepeveen Avatar answered Mar 02 '26 19:03

Nathan Diepeveen