Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-code-snippets.js not working in Chrome 45.0.2454.101 #16

Closed
jimmygchen opened this issue Oct 13, 2015 · 2 comments
Closed

update-code-snippets.js not working in Chrome 45.0.2454.101 #16

jimmygchen opened this issue Oct 13, 2015 · 2 comments

Comments

@jimmygchen
Copy link

I'm getting the following error when running the snippet update-code-snippets.js to update my snippets:
Cannot find scriptSnippets, are you running in the secondary DevTools? see https://github.com/bahmutov/code-snippets#updating-local-code-snippets

My Chrome version is 45.0.2454.101 m.

I ran the snippet from the 2nd DevTools instance (following the steps in documentation) but it doesn't work - scriptSnippets key doesn't exist in localStorage. It seems that scriptSnippets are no longer stored in localStorage?

My temporary workaround to this problem is to modify the update-code-snippet.js (not nice but works for me atm):
https://gist.github.com/jchen86/3ca08af721a43725ebf6

@hoto
Copy link

hoto commented Jan 21, 2016

Looks like Chrome removed snippets access from dev tools local storage. This https://developers.google.com/web/tools/chrome-devtools/debug/snippets/#map-snippets-to-external-files-via-workspaces says one can map snippets to folder on a disk but i could not recreate that.
Only thing that was working was to create a Workspace that points to my folder with git repository (with snippets). But files from that folder do not display in Snippets tab, only in Sources tab and cannot be run :(
And those files are not carried with my Chrome installations on different machines.

@jchen86 looks like WebInspector.scriptSnippetModel._snippetStorage.snippets(); no longer works in current Chrome distribution.
I could not find what is the new way of accessing snippets in Chrome.

@bahmutov
Copy link
Owner

bahmutov commented Apr 2, 2016

Might be same as #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants