(In reply to Ankush Dua from comment #3)
I am very new to firefox and I had a few initial things to ask:
- I don't know any extension that requires a devtools optional permission, so I downloaded extensions from here which had devtools_page property in manifest.json, but I am not sure how I can load my local addons extension to my local build of firefox, If you could point me to some resource from where I can learn to do just that, it would be wonderful. and if you have any extension that you know does have devtools_pages property in its manifest.json, that will be awsome
Sure thing, you can find docs about how to develop extensions (including how to install them temporarily) in the following documentation website:
I would suggest you to take a look to this website to get a better picture of how to develop extensions.
The following doc page is the one that describes in a bit more detail how to install an extension temporarily while developing:
- I am new to firefox as a whole, so asking just to make sure I am getting things correctly,
developer toolbox is the panel that opens up when we right click on a webpage and click inspect? (where we debug our code in browser and much more)?
Yes, the developer toolbox we refer to here is the one related to the current tab (which is the one that gets opened when a user inspect a DOM element as you are describing):
- I could not find the following section in developer toolbox setting: ( to go to settings in developer toolbox we need to click 3 vertical dots on the top right of the toolbar right?) and could not find any addons listed there.
the extension is listed in the devtools toolbox settings view (in the section tools installed by add-ons) and it is enabled
From what you describe I guess that your
devtools_page is not creating any devtools panel, the
devtools_page is actually an invisible page similar to the background page and it has to explicitly create the panels that are actually going to be visible to the user.
You may find the following MDN doc page useful to learn more about how the extension can extend the developer tools (and this doc page also mention what I briefly described above about the devtools_page being actually invisible):
You should also take a look to the existing devtools API examples in the mdn/webextensions-examples repository, because they are small and simple examples and they would also help you to get a better picture:
- Does the extension ask for the devtools permission itself or do we have to manually go to a dedicated section to grant that permission?
- the extension can ask for new optional permission to be granted using the
browser.permissions API (and can also revoke them, revoking doesn't need to ask to the user any confirmation, granting one does wait for the user confirmation), see the following API reference and example:
- Starting from Firefox 84 the user can also grant and revoke the optional permissions from the extension detail view in about:addons (you can see also a brief demo of this feature from our last Add-ons Show and Tell meeting here)
You welcome, let me know if this bugzilla comment did not yet answer all your questions (and/or if they do then let me know how it is going and you got stuck on something).
As a side note: When you add a comment with questions for me on bugzilla you can also add a "Request information" assigned to me (you can find it at the bottom of the bugzilla page, check it and choose
mentor in the related select popup), by doing that I will be notified that there is a question pending an answer from me (I still go through my mentored bugs during the week, but I may get to your questions sooner if I'm aware that you are waiting for my reply).