I made such a script that makes links from Console Browser DevTools, open in VSCode #9397
lukaszpolowczyk
started this conversation in
Ideas
Replies: 1 comment
-
The purpose of the thread is to discuss whether it can be done better, in a plugin, or a built-in mechanism in a web browser- https://bugzilla.mozilla.org/show_bug.cgi?id=1771862 Original post - sveltejs/vite-plugin-svelte#400 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I made such a script that makes links from Console Browser DevTools, open in VSCode. This uses the mechanism in Vite. It works great, you can test it. It works for sure with SvelteKit from Vite in Firefox and Chromum browsers.
If anyone needs it, I found an easy way to do it right now, without a plugin and without browser functionality.
Just add the code to
src/app.html
, and it works already.It looks like this:
Just click the url in the console containing
/__open-in-editor?file=
in it, and VSCode will open what you need.It works in Firefox, Chrome, Edge, Vivaldi.
I can already say that it is very convenient. :D
I dream that Mozilla will add this to their DevTools in a refined version.
Or Vite plugin to be created, with a separate console that does not have the flaws that are in this script of mine.
Known problems:
If Vite provided source maps to the client as global objects, this problem with XHR errors could be solved.
/__open-in-editor?file=
, and automatically closes them....I add this code ABOVE
%sveltekit.head%
insrc/app.html
, refresh the page in the browser, and done:Latest source-map version - https://github.com/mozilla/source-map/#use-on-the-web
Beta Was this translation helpful? Give feedback.
All reactions