Is it possible to use the native VSCode JavaScript Debug Terminal to debug my bun app?
It would be cool to have an auto attach like with nodejs.
I do have the "Bun For VSCode" extension installed but I am not able to make it work.
In my package.json I have scripts like
"scripts": {
"start:prod": "cross-env NODE_ENV=production bun src/app.js",
"start:dev": "npm run lint && cross-env NODE_ENV=development bun src/app.js",
"...": "..."
}
and with NodeJS I can just click to create breakpoints in my code, start the JS Debug terminal, and it will hit the breakpoints.
But no matter what I do, all the breakpoints are unbound. It doesn't even work when I click "debug file" in the top bar. This also don't seem to care about my package.json scripts.
I really like the workflow with the JS Debug Terminal. IS there any way?
I saw in a GitHub issue that I can create a .vscode/launch.json file with
{
"bun.debugTerminal.enabled": true
}
but this doesn't seem to be the right thing.