Hello! I am trying to migrate a Chrome extension to Firefox. The original extension utilizes chrome.debugger to attach to active tab and collect user actions’ performance metrics and network requests-responses.
I am trying to find similar functionality in Firefox.
First, I found there is devtools client module
https://firefox-source-docs.mozilla.org/devtools/backend/client-api.html
Unfortunately, I couldn’t find the way to import
resource://devtools/server/devtools-server.js
resource://devtools/client/devtools-client.js
to my background script because resource:// urls are prohibited to use.
Next, there is the Debugger API
I can’t make it work because it should be run in the browser content not in background script content.
Is there any way to attach a debugger from an addon to active tab and use its API?