mozilla-extensions / remote-settings-devtools

about:remotesettings
Mozilla Public License 2.0
15 stars 9 forks source link

Document how to use remote-settings-dev tools as part of a debugging workflow #60

Open mostlygeek opened 3 years ago

mostlygeek commented 3 years ago

Place holder for notes as I had to do this recently.

  1. Is it on the server?
    • how to check your collection data using HTTP endpoints on dev/stage/prod
  2. Is it on your client?
    • how to enable the Browser Toolbox
    • how to find remote-settings data: storage > indexed DB > chrome > remote-settings > records, image
    • How to filter for records ("Filter Items"). Note the list is lazy loaded. So filtering only works on what's been loaded. Is there a better, more UX friendly way than scrolling through the list to force load?
  3. Notes for using dev tools
    • Why isn't my collection listed? The Collection list is lazy. A collection won't show up until the remote-settings client has been called by some feature's code. To do it manually:
    • In the browser toolbox > console , ChromeUtils.import("resource://services-settings/remote-settings.js").RemoteSettings("ms-language-packs")
    • refresh the remote-settings dev tools page, the collection should be in the list now
    • How to clear all local data (using dev tools), and confirming it (using browser toolbox)
mostlygeek commented 2 years ago

re collection not showing up

We fetch the whole list of collections from monitor/changes, and then for each entry, we check whether:

an instantiated client exists (RemoteSettings("cid" was called)
local data exists
a package dumps exists

Otherwise we ignore it.https://searchfox.org/mozilla-central/rev/3d03a3ca09f03f06ef46a511446537563f62a0c6/services/settings/remote-settings.js#120-149

leplatrem commented 2 years ago

Note: we could add a contextual help in the UI that points to a dedicated section in the docs remote-settings.readthedocs.io