Struct deno_core::JsRuntimeInspector
source · pub struct JsRuntimeInspector { /* private fields */ }
Expand description
This structure is used responsible for providing inspector interface
to the JsRuntime
.
It stores an instance of v8::inspector::V8Inspector
and additionally
implements v8::inspector::V8InspectorClientImpl
.
After creating this structure it’s possible to connect multiple sessions to the inspector, in case of Deno it’s either: a “websocket session” that provides integration with Chrome Devtools, or an “in-memory session” that is used for REPL or coverage collection.
Implementations§
source§impl JsRuntimeInspector
impl JsRuntimeInspector
pub fn new( scope: &mut HandleScope<'_>, context: Local<'_, Context>, is_main_runtime: bool ) -> Rc<RefCell<Self>>
pub fn is_dispatching_message(&self) -> bool
pub fn context_destroyed( &mut self, scope: &mut HandleScope<'_>, context: Global<Context> )
pub fn exception_thrown( &self, scope: &mut HandleScope<'_>, exception: Local<'_, Value>, in_promise: bool )
pub fn has_active_sessions(&self) -> bool
pub fn has_blocking_sessions(&self) -> bool
pub fn poll_sessions( &self, invoker_cx: Option<&mut Context<'_>> ) -> Result<Poll<()>, BorrowMutError>
sourcepub fn wait_for_session(&mut self)
pub fn wait_for_session(&mut self)
This function blocks the thread until at least one inspector client has established a websocket connection.
sourcepub fn wait_for_session_and_break_on_next_statement(&mut self)
pub fn wait_for_session_and_break_on_next_statement(&mut self)
This function blocks the thread until at least one inspector client has established a websocket connection.
After that, it instructs V8 to pause at the next statement. Frontend must send “Runtime.runIfWaitingForDebugger” message to resume execution.
sourcepub fn get_session_sender(&self) -> UnboundedSender<InspectorSessionProxy>
pub fn get_session_sender(&self) -> UnboundedSender<InspectorSessionProxy>
Obtain a sender for proxy channels.
sourcepub fn add_deregister_handler(&mut self) -> Receiver<()> ⓘ
pub fn add_deregister_handler(&mut self) -> Receiver<()> ⓘ
Create a channel that notifies the frontend when inspector is dropped.
NOTE: Only a single handler is currently available.
sourcepub fn create_local_session(&self) -> LocalInspectorSession
pub fn create_local_session(&self) -> LocalInspectorSession
Create a local inspector session that can be used on the same thread as the isolate.