summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/web_worker.rs6
-rw-r--r--runtime/worker.rs6
2 files changed, 12 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) = {
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 {