Repository navigation
Browser console logs from a Vite dev server, shown on your source lines in VS Code with no plugin #23983
lagudafuadtosin
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Ever had a value you logged in the browser and then hunted for it in DevTools while your code sat open in VS Code?
I made a VS Code extension, Inline Logs, that puts browser
console.logoutput from a Vite dev server on the source line that logged it. There is no Vite plugin to add. When you startvitein the VS Code terminal, the extension adds a small script to the HTML Vite serves, before/@vite/client, and maps each browser stack back through Vite's source maps.A few Vite things it handles:
It is free and open source (GPL), and nothing leaves your machine.
https://marketplace.visualstudio.com/items?itemName=lagudafuadtosin.inline-logs
https://github.com/lagudafuadtosin/inline-logs
If your Vite setup puts a value on the wrong line, an issue with the Vite version and framework would help a lot.

All reactions