Skip to content

Commit

Permalink
VSCode in-editor error messages (readme updates) (#15325)
Browse files Browse the repository at this point in the history
Co-authored-by: Jarred Sumner <[email protected]>
  • Loading branch information
alii and Jarred-Sumner authored Nov 23, 2024
1 parent 514a47c commit f855ae8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/bun-vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ At its core is the _Bun runtime_, a fast JavaScript runtime designed as a drop-i
<br/>
</div>

## Features:

- Live in-editor error messages (gif below)
- Test runner codelens
- Debugger support
- Run scripts from package.json
- Visual lockfile viewer (`bun.lockb`)

## In-editor error messages

When running programs with Bun from a Visual Studio Code terminal, Bun will connect to the extension and report errors as they happen, at the exact location they happened. We recommend using this feature with `bun --watch` so you can see errors on every save.

![Error messages example](./error-messages.gif)

<div align="center">
<sup>In the example above VSCode is saving on every keypress. Under normal configuration you'd only see errors on every save.</sup>
</div>

Errors are cleared whenever you start typing, or whenever the extension detects that Bun just started running (or reloading) a new program.

## Configuration

### `.vscode/launch.json`
Expand Down
Binary file added packages/bun-vscode/error-messages.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f855ae8

Please sign in to comment.