Skip to content

How to open VS Code with a Tauri App? #5053

Answered by FabianLars
pt-hieu asked this question in Q&A
Discussion options

You must be logged in to vote

The problem with vscode in particular is that what's added to the PATH var is not the exe itself, but a cmd script. This means that, at least on windows, you have to explicitly call that file by changing the scope config's cmd to "cmd": "code.cmd".
On Linux/macos it's a bit tricky since the bundled app packages don't even have inherit the PATH from shell dotfile (you can regain access to it via this crate https://github.com/tauri-apps/fix-path-env-rs). But on these platforms you probably would invoke the equivalent to sh -c "code path" to start vscode (which should work on windows too btw)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pt-hieu
Comment options

Answer selected by pt-hieu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants