oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.48k stars 2.78k forks source link

[VSCode] Debugger does not log to debug console #14244

Open elemental-mind opened 2 months ago

elemental-mind commented 2 months ago

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?

  1. Create a file with a console.log statement. For example:
    console.log("This should be displayed on the debug console.");
    console.log("This as well");
    console.log("But it simply does not show up");
  2. Debug the file and observe the "Debug Console"

What is the expected behavior?

The log statements get logged to the debug console.

What do you see instead?

The debug console simply shows:

Debugger attached. Debugger detached.

image

The console.log statements are missing.

Additional information

This is the excerpt of the launch.json:

    "configurations": [
        {
            "name": "Launch and attach",
            "type": "bun",
            "request": "attach",
            "url": "ws://127.0.0.1:5000/test",
            "preLaunchTask": "Bun: Start Debugger",
            "internalConsoleOptions": "openOnSessionStart"
        },
    ]
kcurtet commented 4 days ago

I have the same problem in Nixos