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

[Feature request] Additional button that opens the item in VSCode in the source file #79

Open
lukaszpolowczyk opened this issue Jul 23, 2022 · 2 comments
Labels
suggestion An idea worth exploring

Comments

@lukaszpolowczyk
Copy link

lukaszpolowczyk commented Jul 23, 2022

Can you add a function that works like this:
https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#inspector

Meaning in the DevTools panel an additional button that opens the item in VSCode in the source file?

Inspector in vite-plugin-svelte is based on a very simple url, such as:
http://localhost:5173/__open-in-editor?file=src/lib/Views.svelte:56:3
Such url works, even if the inspector is not enabled.

So all you have to do is svelte-devtools to include this relative url and line number in the element, add a button that opens such a link, and that's all the work.

@unikitty37
Copy link

That works for VSCode users, but it would be better to have an option where the user could select their editor.

Hard-coding the link to work with VSCode means no opportunity to have a link that will open the source file in JetBrains IDEs, for example.

@ignatiusmb ignatiusmb added the suggestion An idea worth exploring label Oct 2, 2023
@ignatiusmb
Copy link
Member

We'll be adding this exclusively to app built with the vite plugin because only vite exposes such functionality to open editors from the browser, at least for now. @dominikg also mentions that vite can open other editors as well, so the extension will be working closely with v-p-s in this manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion An idea worth exploring
Projects
None yet
Development

No branches or pull requests

3 participants