diff --git a/cli/src/native/actions.rs b/cli/src/native/actions.rs index ddf7ae5..012d5cd 100644 --- a/cli/src/native/actions.rs +++ b/cli/src/native/actions.rs @@ -581,6 +581,13 @@ impl DaemonState { self.iframe_sessions .insert(frame_id.clone(), iframe_sid.clone()); if let Some(ref mgr) = self.browser { + let _ = mgr + .client + .send_command_no_params( + "Runtime.runIfWaitingForDebugger", + Some(iframe_sid.as_str()), + ) + .await; let _ = mgr .client .send_command_no_params("DOM.enable", Some(iframe_sid.as_str())) diff --git a/cli/src/native/browser.rs b/cli/src/native/browser.rs index 6e7edec..fb23d1e 100644 --- a/cli/src/native/browser.rs +++ b/cli/src/native/browser.rs @@ -479,6 +479,13 @@ impl BrowserManager { self.client .send_command_no_params("Runtime.enable", Some(session_id)) .await?; + // Resume the target if it is paused waiting for the debugger. + // This is needed for real browser sessions (Chrome 144+) where targets + // are paused after attach until explicitly resumed. No-op otherwise. + let _ = self + .client + .send_command_no_params("Runtime.runIfWaitingForDebugger", Some(session_id)) + .await; self.client .send_command_no_params("Network.enable", Some(session_id)) .await?; @@ -508,6 +515,10 @@ impl BrowserManager { self.client .send_command_no_params("Runtime.enable", None) .await?; + let _ = self + .client + .send_command_no_params("Runtime.runIfWaitingForDebugger", None) + .await; self.client .send_command_no_params("Network.enable", None) .await?;