From fd51b2e506f3ea3cc49bfb2bcb19bc684f563f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 28 Nov 2022 21:59:36 +0100 Subject: fix(npm): allow to inspect npm modules with --inspect-brk (#16841) --- runtime/worker.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/worker.rs') diff --git a/runtime/worker.rs b/runtime/worker.rs index 967d53ea8..01498e1f6 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -250,6 +250,12 @@ impl MainWorker { &mut js_runtime, options.should_break_on_first_statement, ); + + // Put inspector handle into the op state so we can put a breakpoint when + // executing a CJS entrypoint. + let op_state = js_runtime.op_state(); + let inspector = js_runtime.inspector(); + op_state.borrow_mut().put(inspector); } Self { -- cgit v1.2.3