by robenkleene · 6y ago · 0 comments
> Any thoughts in integrating a browser into VS Code? Panic's just released text editor for macOS, Nova, has this feature. The obvious thing it gets you is a live updating preview of HTML files, but taking it further: With VS Code's development community, this seems like it could be the path forward for features like being able to instantly jump to editing the source file for a CSS rule or an HTML element from the DevTools, or jumping to a component's source file from the React DevTools. I'm aware there a couple of projects that have tried to do integrate a browser into VS Code, but nothing has really come to fruition yet, any thoughts?
(Didn’t get much of a response, but obviously no one would talk about this if they knew.)
The above summarizes my thoughts, but here’s another one: This is a key component of GitHub Codespaces. One of the weaknesses in remote development is the round trip between the developer server process and the browser is less seamless than when doing local development. The IDE-style debugger integration doesn’t work without running Chrome on the same machine for example.
Anyway, VS Code now doesn’t have any weaknesses that I’m aware of anymore.
VSCode extensions can render arbitrary html in web view tabs already. However they're sandboxed from the rest of vscode and communication between the browser page and rest of the ide is tricky. This is actually a bit painful if you want to debug something that uses a webview, since vscode's debugger won't step into the embedded window's runtime.
The other obvious win is browsing documentation.
And while the embedded dev tools is very cool, especially for the headless browser, it only brings in even more windows in the main VS Code window. Notice how dev tools typically take the largest part of the screen. In many workflows it is beneficial to have the dev tools on a second or third monitor so it doesn't obscure the code.
I really like this feature when working with multiple monitors - I can keep the primary monitor "clean", with just the editor and solution explorer, and have the test explorer and test runner split vertically in a secondary portrait monitor monitor, and debug/console output in my laptop screen.