1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Chrome DevTools Protocol (CDP) inspector interface.
//!
//! This module contains [`cdp`], a minimal WebSocket server that implements
//! enough of the Chrome DevTools Protocol to support:
//!
//! - **Runtime**: `enable`, `evaluate`, `callFunctionOn`, `getProperties`
//! - **Debugger**: `enable`, `setPauseOnExceptions`, `setBreakpointByUrl`,
//! `resume`
//! - **Console**: `enable`, `disable` (with buffered `messageAdded` events)
//! - **Profiler**: `enable`, `start`, `stop`
//! - **HeapProfiler**: `enable`, `takeHeapSnapshot`,
//! `startTrackingHeapObjects`, `stopTrackingHeapObjects`
//! - **Network**: `enable`, `disable` (stubs for WebSocket-based communication)
/// Breakpoint-based debugger with step-into/over/out, pause-on-exceptions,
/// in-context evaluation, and source-map support.
/// CDP WebSocket server, JSON-RPC message parsing, and domain routing.
/// Console message buffer and CDP `Console` domain event forwarding.
/// Heap snapshot builder: walks the JS value graph and emits a
/// CDP-compatible `HeapProfiler.HeapSnapshot` payload. Also provides
/// allocation tracking via [`heap_snapshot::record_allocation`].
/// Sampling CPU profiler: SIGPROF/setitimer-based sample collection and CDP
/// `Profiler.Profile` emission.
/// Transport-agnostic in-process inspector handle and session container.
///
/// Embedders construct an [`api::InProcessInspector`] alongside their
/// context to drive the CDP dispatcher without standing up a WebSocket
/// server. This is the engine-side type behind the FFI
/// `StatorInspector` handle.