9

I have recently started playing with Bun to run typescript files without compiling them to js. So far so good. Eventually I wanted to debug at runtime but couldn't find anything about it in the docs.

How can I configure my .vscode/launch.json file to debug a project using bun?

I tried playing around with a configuration but didn't get very far:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Bun",
            "type": "node",
            "request": "launch",
            "cwd": "${workspaceFolder}",
            "runtimeExecutable": "bun",
            "runtimeArgs": ["run"]
        }
    ]
}

Looking through the official roadmap, I see nothing about debugging, but maybe it is an experimental feature at this point?

Felipe
  • 10,606
  • 5
  • 40
  • 57
  • 3
    This doesn't seem to be possible yet. There is an open enhancement request for adding a [runtime debugger](https://github.com/oven-sh/bun/issues/1106). – torusJKL Feb 28 '23 at 07:23

0 Answers0