-
-
Notifications
You must be signed in to change notification settings - Fork 227
Description
Scenario:
- Windows 11 (not WSL)
- Vite build w/ Vue Dev Tools plugin
- Using Rider for backend development
- Using WebStorm for frontend development
Configuration:
vueDevTools({
launchEditor: 'webstorm',
}),We have been having issues with the above setup across our developers. Having tracked through the code in both this repository and the launch-editor dependency I can identify a few issues. I think most are likely in the dependency, but wanted to start at the top of the chain:
Error messaging is not clear enough
Could not open [path] in the editor
The editor process exited with an error: (Err code 1)
This is what I was seeing in the console window. It would be really useful here to identify what exactly is being executed, the full CLI that is being executed. That would allow copy-pasting to run directly to immediately see the issue (in this case, webstorm did not exist).
Auto-find is not possible
We have two options in the dev tools configuration. Leave the launchEditor option undefined, in which case code is always chosen, or set an editor (to one of the "known" names or the full string to exe).
launch-editor has the ability to automatically find running editors, not this is not possible when used as part of the dev tools.
Auto-find lacks ability to specify a preference
Auto find can find running editors, but in our case we run both Rider and WebStorm. Because Rider is first alphabetically it will always pick that one, not our preference, WebStorm.
It would be great if we could add a preference order in the short-hand option version, but it still auto-finds the path. WebStorm, particularly when using EAP versions, does not automatically create alias webstorm, which is why we had the failure in the first place. Keeping up with versions and batch alias is error-prone.
If instead we could configure webstorm but the editor launch still tried to find the correct path by looking at running processes we can have the best of both worlds. Automatically finding the correct exe AND being able to specify which one to actually prefer.