当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

cannot debug addon

  • 5 件の返信
  • 1 人がこの問題に困っています
  • 18 回表示
  • 最後の返信者: admin101

more options

Hi,

Thanks to Mozilla for continuing to develop such a clean browser, with movies made of GIF instead of much larger files.

So we have developed an extension or add-on for many years using the same method. But recently ( maybe I forgot ), with a new developer profile, I am unable to edit any files because the .xpi extension in the extensions folder, is compressed and cannot be navigated in a file Explorer.

In the past, I just install the extension and change the file extension from .xpi to .zip, and then extract into a folder with the same name. Then delete the .xpi/.zip folder, and the new folder acts as a pointer for the same instance of installation. And I can just modify the files in that folder usually and I don't need to restart the browser to see the changes. But lately I cannot do this.

What is the best way to debug the add-on with the least number of steps?

Thanks,

Josh

Hi, Thanks to Mozilla for continuing to develop such a clean browser, with movies made of GIF instead of much larger files. So we have developed an extension or add-on for many years using the same method. But recently ( maybe I forgot ), with a new developer profile, I am unable to edit any files because the .xpi extension in the extensions folder, is compressed and cannot be navigated in a file Explorer. In the past, I just install the extension and change the file extension from .xpi to .zip, and then extract into a folder with the same name. Then delete the .xpi/.zip folder, and the new folder acts as a pointer for the same instance of installation. And I can just modify the files in that folder usually and I don't need to restart the browser to see the changes. But lately I cannot do this. What is the best way to debug the add-on with the least number of steps? Thanks, Josh

選ばれた解決策

admin101 said

For example, these days I have to edit the JavaScript file, CTR+S, then open new Mozilla developer edition, open the debugging tab, then click the open temporary add-on, then select the file, check the operation of the add-on.

Once you temporarily load the extension via about:debugging, after modifying any of its source files, you just have to click the Reload button to reload the extension. (See attached screenshot.)

この回答をすべて読む 👍 0

すべての返信 (5)

more options

You should be able to point to a given file inside a folder (unzipped/compressed) with the appropriate contents (manifest.json, js, icon/48.png) to load an addon temporarily, then you can just reload it each time you make changes to those files? per https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension (obviously this isn't your first but details this method)

In about:debugging#/runtime/this-firefox

I think that'd be simplest, but someone might have a better method.

more options

Hi evhenry,

Thanks for the support.

Yes I know about loading the add-on from there, but it just seems quite cumbersome to keep reloading.

Josh

この投稿は admin101 により に変更されました

more options

For example, these days I have to edit the JavaScript file, CTR+S, then open new Mozilla developer edition, open the debugging tab, then click the open temporary add-on, then select the file, check the operation of the add-on.

Previously, after editing the JavaScript file, CTR+S, ALT+TAB to Mozilla developer edition, then check the operation of the add-on.

more options

選ばれた解決策

admin101 said

For example, these days I have to edit the JavaScript file, CTR+S, then open new Mozilla developer edition, open the debugging tab, then click the open temporary add-on, then select the file, check the operation of the add-on.

Once you temporarily load the extension via about:debugging, after modifying any of its source files, you just have to click the Reload button to reload the extension. (See attached screenshot.)

more options

admin101 said

For example, these days I have to edit the JavaScript file, CTR+S, then open new Mozilla developer edition, open the debugging tab, then click the open temporary add-on, then select the file, check the operation of the add-on. Previously, after editing the JavaScript file, CTR+S, ALT+TAB to Mozilla developer edition, then check the operation of the add-on.

Thanks! That's very helpful.