microsoft / microsoft/vscode-js-debug

Debugger gets stuck after attaching. Sometimes works

Open
#1,683 8 comments 1 reaction 1 assignee View on GitHub

@connor4312 is already working on this.

Since Apr 27, 2023.

bug info-needed
Dominant language
TypeScript
Stars
2k
Forks
373
Avg merge
1d 9m
Merged PRs (30d)
6

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.