Skip to content

Commit

Permalink
fix: --inspect-brk to pause before execution
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Mar 7, 2024
1 parent 6d1b145 commit f21b5dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/vitest/src/runtime/inspector.ts
Expand Up @@ -20,8 +20,14 @@ export function setupInspect(config: ResolvedConfig) {
if (!isOpen) {
inspector.open()

if (config.inspectBrk)
if (config.inspectBrk) {
const session = new inspector.Session()
session.connect()
session.post('Debugger.enable')

inspector.waitForDebugger()
session.post('Debugger.pause')
}
}
}

Expand Down

0 comments on commit f21b5dd

Please sign in to comment.