bun
bun copied to clipboard
No source files in debugger with `--inspect`
What version of Bun is running?
1.0.0
What platform is your computer?
WSL Debian
What steps can reproduce the bug?
Running bun run --inspect index.ts
runs the file and creates a debugger at debug.bun.sh
. But no files show up in the debugger.
I tested the same code on Ubuntu to everything worked as expected.
What is the expected behavior?
Expect debugger to show files being debugged
What do you see instead?
No files are found
Additional information
No response
I have the same experience.
Started with bun run --inspect index.ts
in the Linux shell, and gets startup logs.
Goes to the link specified and meets no files. The breakpoints were also not stopping the code execution.
Trying to attach with VSCode gave me
Debugger detached.
Unexpected server response: 404
2
Debugger detached.
Unexpected server response: 404
2
Debugger detached.
Unexpected server response: 404
Debugger detached.
For me, it seems the underlying issue is the websocket connection is failing. While Windows/WSL normally has bridging so localhost/127.0.0.1 "just work" across environments, in this case it seems it might need to be the actual WSL IP address?
However, upon changing that manually (e.g. https://debug.bun.sh/#172.28.21.84:6499/
) I then get a WebKit Inspector error, which is a result of "Mixed Content: The page at 'https://debug.bun.sh/#172.28.21.84:6499/h5asdy9zdw' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://172.28.21.84:6499/h5asdy9zdw'.
same issue(
I think the title should be updated to WSL issue somewhere. I feel like @infrahead is right on the money. Even replacing localhost with 127.0.0.1 seems to always work
I'm seeing the same issue on macOS 14.1
This might be a dumb suggestion, but for me, disabling my browser's ad blocker fixed the issue. I'm running Linux Mint with Brave.
This might be a dumb suggestion, but for me, disabling my browser's ad blocker fixed the issue. I'm running Linux Mint with Brave.
I also ran into this issue. I added the following line to my filters in ublock Origin:
@@||localhost:6499^$websocket,domain=debug.bun.sh
same, safari macos using bun server. sources not appearing. disabled ad blockers, private browser, executing script directly, through the workspace, with --inspect --inspect-brk, with and without debugger statements in the source code. sad