Bun users can't debug Node.js processes in VS Code
13 posts since Aug 2023, all from GitHub.
“What version of Bun is running? 1.2.21+7c45ed97d What platform is your computer? Microsoft Windows NT 10.0.26100.0 x64 What steps can reproduce the bug? Bun shows duplicated/superfluous lines in the stack trace from an error. This is NOT a minimal reproduction, however it should…”
“What is the problem this feature would solve? Allow bun to run/debug single files directly in VSCode without needing to open a folder. This would make it easier to run/debug random scripts opened in VSCode. Suppose we have the following folder structure: When this folder is…”
“What version of Bun is running? 1.4.3+c6da4a4d3 What platform is your computer? Darwin 27.0.0 arm64 arm What steps can reproduce the bug? 1. Create an empty folder and open it in VSCode. 2. Make sure to have the Bun extension installed and enabled. 3. Create a script.js file…”
VS Code's 'Attach to Node Process' fails to connect to Bun processes due to port mismatches and missing compatibility in the debug protocol. Users cannot attach the debugger despite Bun appearing in the process list.
SOURCES (13)
“What version of Bun is running? 1.4.3+c6da4a4d3 What platform is your computer? Darwin 27.0.0 arm64 arm What steps can reproduce the bug? 1. Create an empty folder and open it in VSCode. 2. Make sure to have the Bun extension installed and enabled. 3. Create…”
“bun run lint does not run at all in this repo, on development or on any branch cut from it. ESLint fails while loading its own modules, before it reads a single source file: Cause package.json pins typescript at ^7.0.2 and @typescript eslint/ at ^8.60.0 . TypeScript 7 no longer exposes the ts.Extension enum where typescript estree reads it: typescript eslint 8 does not support TypeScript 7. Both pins are already on development , so this is not specific to any branch in flight. Effect CI is unaff”
“What version of Bun is running? 1.3.14+0d9b296af What platform is your computer? Linux 7.1.5 arch1 2 x86 64 unknown What steps can reproduce the bug? create a file like lib.spec.js with the following content: running bun test produces a test error. adding a jest.config.js file with the contents and running bunx jest test . passes both tests. running either test runner with u changes the snapshot to their preferred formatting. What is the expected behavior? in codebases that use both bun and jest”
“What version of Bun is running? 1.4.0 canary.1+b7a043103 What platform is your computer? Linux 7.1.8 1 cachyos x86 64 unknown What steps can reproduce the bug? Save the following as repro.mjs : Run it as an ES module: This also occurs during SvelteKit SSR. SvelteKit's make trackable function creates a URL and assigns an instance specific Symbol.for('nodejs.util.inspect.custom') function in packages/kit/src/utils/url.js:139 148 . Loading a server rendered route reaches this code and throws. What”
“What version of Bun is running? 1.3.12+700fc117a What platform is your computer? Linux 6.6.87.2 microsoft standard WSL2 x86 64 x86 64 What steps can reproduce the bug? Bun does not export markAsUncloneable from node:worker threads , even though the Bun reference docs claim the API is supported (the docs appear to be auto generated from Node's type declarations). Minimal repro — the API itself is missing: Real world repro via undici 8.1.0, which is where this actually bites users. undici 8.0.3 re”
“What version of Bun is running? 1.3.11 What platform is your computer? Windows What steps can reproduce the bug? 1. Create test.ts below in cwd 2. Open cwd in VS Code. 3. Run bun inspect brk .\test.ts . 4. Open VS Code, Ctrl Shift P Debug: Attach to Node Process <img width="617" height="60" alt="Image" src="https://github.com/user attachments/assets/21cfff0f c3c6 45f2 8c91 e5fdee829896" / 5. bun appears to be there, though with the wrong port it shows 9229 , while during launch it showed ws://lo”
“What version of Bun is running? 1.2.20+6ad208bc3 What platform is your computer? Darwin 24.6.0 arm64 arm What steps can reproduce the bug? 1. Create a index.ts file: 2. Compile it: 3. Run it: What is the expected behavior? Output in terminal: What do you see instead? Output in terminal: Additional information No response”
“What version of Bun is running? 1.2.21+7c45ed97d What platform is your computer? Microsoft Windows NT 10.0.26100.0 x64 What steps can reproduce the bug? Bun shows duplicated/superfluous lines in the stack trace from an error. This is NOT a minimal reproduction, however it should demonstrate the issue clearly: And this is the stack trace from Node.js: Here is the code that generates the stack frame output: And then you can use this function to in other functions, and by using those functions you”
“What is the problem this feature would solve? Allow bun to run/debug single files directly in VSCode without needing to open a folder. This would make it easier to run/debug random scripts opened in VSCode. Suppose we have the following folder structure: When this folder is opened in VSCode, both node and bun can debug/run the files correctly. However, if no folder is opened, node can still debug/run 111/111.js , 222.js and other opened files correctly, but bun will refuse to debug/run these fil”
“What version of Bun is running? 1.1.6 What platform is your computer? Microsoft Windows NT 10.0.22631.0 x64 What steps can reproduce the bug? 1. Create a simple express server listening on port 5000 and logging "Server listening on port 5000" 2. Run the script with hot 3. When bun restarts the script, 2 logs of "Server listening on port 5000" show up. What is the expected behavior? Only 1 log of "Server listening on port 5000" showing up. What do you see instead? No response Additional informati”
“What version of Bun is running? 1.0.23+3c785c88f What platform is your computer? Linux 5.15.133.1 microsoft standard WSL2 x86 64 x86 64 VSCode: Version: 1.86.0 insider (user setup) Commit: 271fb7fbd599b49a1482ea7284a50b3229317f96 Date: 2024 01 19T05:37:08.195Z Electron: 27.2.1 ElectronBuildId: 26149897 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18 electron.0 OS: Windows NT x64 10.0.22621 What steps can reproduce the bug? 1. Clone https://github.com/dayblox/bun ts 2. bun i 3. Place a”
“What version of Bun is running? 1.0.11 What platform is your computer? Darwin 22.6.0 x86 64 i386 What steps can reproduce the bug? Run in console bun <(echo "console.log('hello')") What is the expected behavior? Command prints hello to stdout. What do you see instead? error: script not found "/dev/fd/13" Additional information <img width="375" alt="image" src="https://github.com/oven sh/bun/assets/130013/6d61147f 7423 40fb 973c 326b88a2e454"”
“What version of Bun is running? 0.8.1+16b4bf341acc0f4804f0b6bdf5298c180cd00366 What platform is your computer? Darwin 22.5.0 x86 64 i386 What steps can reproduce the bug? Running this code bug.js with node.js with deno with bun What is the expected behavior? The first line of the stack should start with at Class.name instead of at name . What do you see instead? No response Additional information No response”
