3 ms·
For VS Code, it’s like developing for another web browser, your VS Code IDE launches another instance of VS Code with your plugin running, and you can “Refresh”
by lstamour 7y ago
For VS Code, it’s like developing for another web browser, your VS Code IDE launches another instance of VS Code with your plugin running, and you can “Refresh” the second instance of VS Code to reload your plugin’s changes. Installing a plugin once developed is of course possible, but as far as I know there’s no hot-reload outside of this Extension Development Host window. Basics at https://code.visualstudio.com/api/get-started/your-first-extension https://code.visualstudio.com/api/get-started/your-first-ext... and you can run automated tests also in that second IDE window.
That said, VS Code isn’t as flexible—there’s a distinction between building VS Code and building an extension, and the two aren’t equivalent. The closest analogy I can think of is developing an old-fashioned XUL Firefox extension vs a new Chrome-style extension. The former used the same building blocks the app used, the latter was intentionally sandboxed and sanitized.
That said, you can do a heck of a lot with VS Code extensions, enough that I don’t want to install any I don’t trust —they can run programs and never prompt you for permissions, etc. So with great power comes great responsibility ;-)
And it could be argued that in a perfect world, VS Code should have both a live-edit-and-reload experience for plugin development alongside a more formal, sandboxed approach with signing and permissions and everything.
- robocat 7y ago> you can do a heck of a lot with VS Code extensions, enough that I don’t want to install any I don’t trust —they can run programs and never prompt you for permissions Doesn't Emacs have the same issue - you really really have to trust any package you install?
- celeritascelery 7y agoThat is true, probably even more so then VS code. Though I never heard of malicious Emacs package. That may because it is such a small attack vector compared to something like VS code.
- robocat 7y ago> small attack vector That's irrelevant: what matters is the value of an attack vector. e.g. Bill Gates is a small attack vector. Attack the high value of some developers assets, or attack the high value of some of the businesses they work for.