How to test & debug what happens on browser quit and restart

There’s some setting (via about:config) in Firefox Developers Edition making it possible to install your local version permanently. I don’t remember details right now, and I’m not in general the expert regarding debugging webextensions.

Just want to mention that there’s been a lot of bugs regarding context-menu items disappearing in different situations (some fixed now, some not), so while it in principle it shouldn’t be needed, I have ended up pretty aggressively redefining my menu items. Currently I (re)define my menu items both on onInstalled and onStartup plus a scenario where I have detected that my extension probably was allowed to run in private mode under installation (the latter should be fixed in Firefox 128 or 129). Yes sounds like there are several cases I’m doing it double, but got so tired of getting reports of missing menu items in my extension.

Maybe it would be simpler to just always (re)define menu-item in “top level” of backgroundscript, so it happens every time backgroundscript runs. Got to clean up my messy code around this some day :slight_smile:

Some related bugs/links (I remember it like there was more bugs than this, but those I still refer to in comments in my extension code):

2 Likes