bun icon indicating copy to clipboard operation
bun copied to clipboard

Support integratedTerminal setting in VSCode debugger

Open kirankunigiri opened this issue 1 year ago • 5 comments

What version of Bun is running?

1.1.34

What platform is your computer?

Darwin 23.6.0 arm64 arm

What steps can reproduce the bug?

When I run a file with bun from the terminal, both readline and process.stdout.write work correctly. But when I do it from the VSCode debug console with the Bun extension, all inputs are completely skipped and it doesn't wait for me to type user input. This is an issue with VSCode debugger not supporting user input in general (for node as well).

With node.js, VSCode supports the following setting inside the launch.json configuration: "console": "integratedTerminal" This allows the node vscode debugger to use the integrated shell which does support user input. However, Bun does not support this setting inside it's launch.json configuration. Enabling this does nothing.

What is the expected behavior?

Bun should enable support of the "console": "integratedTerminal" option so that it will work with the VSCode debugger with the integrated terminal and support user input.

What do you see instead?

No response

Additional information

No response

kirankunigiri avatar Dec 11 '24 08:12 kirankunigiri

Yes, would be real nice!

vladkrasn avatar Mar 01 '25 08:03 vladkrasn

How is bun not fully supporting VSCode, the most used IDE? x_X. Cursor/Windsurf/VSCode, they all have problems with debugging, why not support it 100%?

0xRapid avatar Aug 02 '25 23:08 0xRapid

Not outputting to integratedTerminal means it's harder to share context with an agent in Cursor.

molhar avatar Oct 02 '25 11:10 molhar

That would be very very useful as it will enable us to run/debug a program from inside VS Code that requires some sort of user input from the console to continue.

objectref avatar Nov 21 '25 21:11 objectref

When I try to debug using bun:ffi + zig, some API calls always fail. I'm not sure if the problem is related to this issue. Env: Win + VSCode + Bun Extension

if (windows.kernel32.SetConsoleMode(stdin_handle, new_mode) == windows.FALSE) {
    err.osApiError("Failed to set console mode");
}

AlphaFoxz avatar Dec 28 '25 07:12 AlphaFoxz