File SystemRuntime & Debugging
Debugging Bun with the web debugger
Bun speaks the WebKit Inspector Protocol . To enable debugging when running code with Bun, use the --inspect flag. Consider the following web server.
Debugging Bun with the VS Code extension
Bun speaks the WebKit Inspector Protocol , so you can debug your code with an interactive debugger.
Inspect memory usage using V8 heap snapshots
Bun implements V8's heap snapshot API. Use it to capture the heap at runtime and debug memory leaks in your JavaScript/TypeScript application.