Open elemental-mind opened 1 month ago
For anyone looking for a workaround to the problem use the following setup:
.vscode/launch.json
:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch and attach",
"type": "bun",
"request": "attach",
"url": "ws://127.0.0.1:5000/test",
"preLaunchTask": "Bun: Start Debugger",
"internalConsoleOptions": "openOnSessionStart"
}
]
}
.vscode/tasks.json
:
{
"version": "2.0.0",
"tasks": [
{
"label": "Bun: Start Debugger",
"type": "shell",
"command": "bun --inspect-brk=127.0.0.1:5000/test test.ts",
"isBackground": true,
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "Listening:",
"endsPattern": "ws://127.0.0.1:5000/test"
}
}
]
}
]
}
Can confirm this issue for bun 1.1.33 with VSCode on Windows and extension version v0.0.15.
Workaround works
What version of Bun is running?
1.1.30-canary.71+af82a446d, VSCode Extension Version v0.0.15
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
launch.json
config that the debugger suggests by default for bun:What is the expected behavior?
The debugger launches bun and attaches to it and stops at the first breakpoint set.
What do you see instead?
On the debug console I see the following output:
Also, the extension host complains about an invalid debug adapter:
Additional information
No response