bun
bun copied to clipboard
Bun can "run", but not "debug" NPM scripts in VSCode
What version of Bun is running?
1.0.18+36c316a24
What platform is your computer?
Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
Video illustrates this best -
- I show running "dev" command works fine, server is started
- I try running the debug, and I get the message
Failed to start debugger.
Program must be a JavaScript or TypeScript file.
https://github.com/oven-sh/bun/assets/14075632/d93349f0-d971-47d9-9beb-adfe90189c2b
I'm using a fresh install of create-t3-app if you want to reproduce my exact setup
npm create t3-app@latest> select every option, use prisma as DB > runnpx prisma db push
What is the expected behavior?
Bun should start the debug session, it works with node using the following launch.json
"configurations": [
{
"name": "Node run NPM script",
"type": "node",
"request": "launch",
"runtimeArgs": [
"run-script",
"dev"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
}
]
What do you see instead?
No response
Additional information
No response
The same issue in Mac Orbstack created Ubuntu, can run but can not debug, same output
For me it just opens a JavaScript Debug Terminal and does nothing after that, no errors. Latest version 1.0.25 with latest vscode extension version.