Open DetachHead opened 1 year ago
Just discovered this with slightly different repro steps and symptoms. I usually use the JavaScript Debug Terminal by manually opening it from the Terminal panel:
Running any Node.js process from this terminal is supposed to auto-attach the debugger. When the extension is installed, commands from this terminal execute normally, but the debugger never attaches. (Running bun
from this terminal also does not initiate any debug functionality.)
Fwiw, in addition to the aforementioned issue, I find that nothing happens when I run the Bun: Run File (extension.bun.runFile
) or Bun: Debug File (extension.bun.debugFile
) commands to run the currently opened script. No error, just silently does nothing. I'm guessing these have the same root cause as this issue, as it appears from the code that they both factor through the same functions
Note that when I use the hover action, the JavaScript Debug Terminal does open, but nothing gets typed in there and nothing runs. If I then manually run the script by typing eg bun myScriptName
into the JavaScript Debug Terminal, it runs and the debugger attaches properly, which did not occur before I installed the extension
Just discovered this same issue and easily isolated it to the Bun VSCode plugin. To reproduce the issue:
Create a test javascript file:
// test.js
function main() {
debugger;
}
main();
node test.js
. You'll see it hit the breakpoint.Those who have already read the Readme.md are aware, but you can disable JavaScript Debug Terminal integration and debug Bun from the launch.json config or the F5 menu instead:
{
"bun.debugTerminal.enabled": false
}
Or you can toggle the setting with Toggle when you need to debug Bun (remember to create a new terminal after that).
What version of Bun is running?
1.0.1
What platform is your computer?
Darwin 22.1.0 x86_64 i386
What steps can reproduce the bug?
oven.bun-vscode
extensionpackage.json
and click "Debug Script"What is the expected behavior?
either:
What do you see instead?
"JavaScript Debug Terminal" appears and does nothing, and "Terminal has already been disposed" error displays on the bottom right
Additional information
No response