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

Debugger gets stuck after attaching. Sometimes works #1683

Open
joshua-rh opened this issue Apr 27, 2023 · 8 comments
Open

Debugger gets stuck after attaching. Sometimes works #1683

joshua-rh opened this issue Apr 27, 2023 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@joshua-rh
Copy link

joshua-rh commented Apr 27, 2023

Describe the bug
I have a pretty basic launch config which I've hardcoded to run a single test with jest. On most runs, it would get stuck at Debugger attached.. I have to Reload window to resolve it.

I have also tried running jest through jest-cli, yarn but same result.

"type": "node",
"request": "launch",
"args": [
  "--watchAll=false",
  "test/jest/something.test.ts"
],
"name": "Run Jest",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
"console": "integratedTerminal"

To Reproduce
Run launch config.

Occasionally it works. For examples, once it ran 3 times successfully then gets stuck on the 4th. But most of the time it gets stuck.

Additional context: we have a monorepo, use yarn workspaces and I use a multi-root workspace.

For what it's worth, same thing happens when I run jest separately and attach the vscode debugger.

Log File

runtime.launch Bootloader imported {
  env: {
    inspectorIpc: '/var/folders/lb/f9whw1cj2vs10tmm1msy2k4h0000gn/T/node-cdp.67682-5614ab53-1.sock',
    deferredMode: false,
    waitForDebugger: '',
    execPath: '/opt/homebrew/opt/node@16/bin/node',
    onlyEntrypoint: false,
    verbose: true,
    autoAttachMode: 'always',
    fileCallback: '/var/folders/lb/f9whw1cj2vs10tmm1msy2k4h0000gn/T/node-debug-callback-f83d60bbfe5d3853'
  },
  args: [
    '/opt/homebrew/Cellar/node@16/16.20.0/bin/node',
    '<to my repo>/node_modules/jest/bin/jest.js',
    '--watchAll=false',
    'test/jest/something.test.ts'
  ]
}
runtime Set debug mode { mode: 0 }
Debugger attached.

VS Code Version: 1.77.3

Additional context
Add any other context about the problem here.

@joshua-rh joshua-rh added the bug Issue identified by VS Code Team member as probable bug label Apr 27, 2023
@connor4312
Copy link
Member

Please collect a log file using the instructions in the issue template. The log file location will be written to the Debug Console view, it looks like you've just got what's in the Terminal. That's sometimes useful, but not in this case

@connor4312 connor4312 added the info-needed Issue requires more information from poster label Apr 27, 2023
@joshua-rh
Copy link
Author

Hey thanks. Is it normal if the log file can't be uncompressed? All of the logs that has been generated have this issue.

gzip -d vscode-debugadapter-aa5be733.json.gz
gzip: vscode-debugadapter-aa5be733.json.gz: unexpected end of file
gzip: vscode-debugadapter-aa5be733.json.gz: uncompress failed

@connor4312
Copy link
Member

Yea, it can happen if the log is grabbed before the session ends, but it's still readable.

@joshua-rh
Copy link
Author

Okay, I sent you a log to your email. Thanks for looking into it!

@segevfiner
Copy link
Contributor

I'm also hitting this since VS Code 1.78.0, with debug sessions taking an extraordinarily long amount of time to start (They started much faster in the previous VS Code version):

Log: vscode-debugadapter-9cc443f2.json.gz

@connor4312
Copy link
Member

@segevfiner I'm curious what the log looked like in previous versions. I think your case is caused by fixing the IPv4/6 automatic fallback; I'm guessing sourcemaps for sources like http://localhost:5000/node_modules/.vite/deps/buffer.js?v=a237cbc0 don't load, and then we trigger a fallback, and the fallback request times out. I should also add some more logging around when this happens...

@segevfiner
Copy link
Contributor

@connor4312 Which version would you like me to try and with which VS Code version?

@connor4312
Copy link
Member

connor4312 commented Jun 12, 2023

Installing a Nightly version before 2023.3.29** should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants