summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-11-28 21:59:36 +0100
committerGitHub <noreply@github.com>2022-11-28 21:59:36 +0100
commitfd51b2e506f3ea3cc49bfb2bcb19bc684f563f60 (patch)
tree7b8deca6a97e53048293d92cb471d1726e0e3a0f /runtime/web_worker.rs
parent9202611e3695c7091f257b261af809697df959ab (diff)
fix(npm): allow to inspect npm modules with --inspect-brk (#16841)
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 89f0bd6c2..ee47d0d99 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -473,6 +473,12 @@ impl WebWorker {
&mut js_runtime,
false,
);
+
+ // 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);
}
let (internal_handle, external_handle) = {