Skip to content

Debugger gets stuck after attaching. Sometimes works  #1683

Open
@joshua-rh

Description

@joshua-rh

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.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions