Skip to content

Commit f21b5dd

Browse files
committed
fix: --inspect-brk to pause before execution
1 parent 6d1b145 commit f21b5dd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/vitest/src/runtime/inspector.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ export function setupInspect(config: ResolvedConfig) {
2020
if (!isOpen) {
2121
inspector.open()
2222

23-
if (config.inspectBrk)
23+
if (config.inspectBrk) {
24+
const session = new inspector.Session()
25+
session.connect()
26+
session.post('Debugger.enable')
27+
2428
inspector.waitForDebugger()
29+
session.post('Debugger.pause')
30+
}
2531
}
2632
}
2733

0 commit comments

Comments
 (0)