We made snippets (among other settings) available from incognito. I think this change landed in Chrome stable around 46/47 or so.
As a result, they are no longer available in localStorage. Here's the new technique. These are run from a devtools-on-devtools window.
getting snippets
InspectorFrontendHost.getPreferences(_ => console.log(JSON.parse(_.scriptSnippets)))
setting snippets
InspectorFrontendHost.setPreference("scriptSnippets", JSON.stringify(yourSnippets))
FWIW, InspectorFrontendHost.getPreferences will return everything that has migrated to the incognito-available settings (most things), while a few items (like breakpoints) remain in the devtools' localStorage
Tagging a few other issues that use this technique:
We made snippets (among other settings) available from incognito. I think this change landed in Chrome stable around 46/47 or so.
As a result, they are no longer available in
localStorage. Here's the new technique. These are run from a devtools-on-devtools window.getting snippets
setting snippets
FWIW,
InspectorFrontendHost.getPreferenceswill return everything that has migrated to the incognito-available settings (most things), while a few items (like breakpoints) remain in the devtools'localStorageTagging a few other issues that use this technique: