summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/inspector.rs17
-rw-r--r--cli/worker.rs2
2 files changed, 11 insertions, 8 deletions
diff --git a/cli/inspector.rs b/cli/inspector.rs
index 54f431b3e..6db080a34 100644
--- a/cli/inspector.rs
+++ b/cli/inspector.rs
@@ -239,6 +239,7 @@ pub struct DenoInspector {
flags: RefCell<InspectorFlags>,
waker: Arc<InspectorWaker>,
_canary_tx: oneshot::Sender<Never>,
+ pub debugger_url: String,
}
impl Deref for DenoInspector {
@@ -324,6 +325,14 @@ impl DenoInspector {
let (new_websocket_tx, new_websocket_rx) = mpsc::unbounded::<WebSocket>();
let (canary_tx, canary_rx) = oneshot::channel::<Never>();
+ let info = InspectorInfo {
+ host,
+ uuid: Uuid::new_v4(),
+ thread_name: thread::current().name().map(|n| n.to_owned()),
+ new_websocket_tx,
+ canary_rx,
+ };
+
// Create DenoInspector instance.
let mut self_ = new_box_with(|self_ptr| {
let v8_inspector_client =
@@ -342,6 +351,7 @@ impl DenoInspector {
flags,
waker,
_canary_tx: canary_tx,
+ debugger_url: info.get_websocket_debugger_url(),
}
});
@@ -354,13 +364,6 @@ impl DenoInspector {
// Note: poll_sessions() might block if we need to wait for a
// debugger front-end to connect. Therefore the server thread must to be
// nofified *before* polling.
- let info = InspectorInfo {
- host,
- uuid: Uuid::new_v4(),
- thread_name: thread::current().name().map(|n| n.to_owned()),
- new_websocket_tx,
- canary_rx,
- };
InspectorServer::register_inspector(info);
// Poll the session handler so we will get notified whenever there is
diff --git a/cli/worker.rs b/cli/worker.rs
index bbddf91d2..6f2818980 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -92,7 +92,7 @@ pub struct Worker {
pub waker: AtomicWaker,
pub(crate) internal_channels: WorkerChannelsInternal,
external_channels: WorkerHandle,
- inspector: Option<Box<DenoInspector>>,
+ pub(crate) inspector: Option<Box<DenoInspector>>,
}
impl Worker {