Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VSCode] Debugger does not show module level variables #14242

Open
elemental-mind opened this issue Sep 29, 2024 · 2 comments
Open

[VSCode] Debugger does not show module level variables #14242

elemental-mind opened this issue Sep 29, 2024 · 2 comments
Labels
bug Something isn't working debugger Something to do with `bun --inspect` or the debugger

Comments

@elemental-mind
Copy link

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 simple file containing a module level variable. For example:
const moduleLevelVariable = 1000;

console.log(moduleLevelVariable);
  1. Set a breakpoint after the variable is set
  2. Launch the debugger
  3. Check the variables displayed in the "variables" tab in the debugger dialogue

What is the expected behavior?

Module variables should be displayed in the "variables" tab.

In the example given, moduleLevelVariable should be displayed with a value of 1000.

What do you see instead?

The variable moduleLevelVariable does not get displayed. It also does not appear under the "Globals" group.

image

Additional information

No response

@elemental-mind elemental-mind added bug Something isn't working needs triage labels Sep 29, 2024
@tal
Copy link

tal commented Sep 29, 2024

i have the same issue

@Soarex16
Copy link

Soarex16 commented Oct 9, 2024

The problem occurs both in debuggers based on Debug Adapter (tested on WebStorm, logs)
Image
and in the WebKit debugger (debug.bun.sh)
Image
It looks like the problem is somewhere in the runtime itself, because I checked the same example in Safari and the variable is displayed there.
Image

@nektro nektro added debugger Something to do with `bun --inspect` or the debugger and removed needs triage labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working debugger Something to do with `bun --inspect` or the debugger
Projects
None yet
Development

No branches or pull requests

4 participants