From 68eeae70f39e4f5048681d1930ce458bfa7ca6a4 Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Fri, 13 Feb 2026 13:38:27 -0800 Subject: [PATCH] fix: set usePollingTraps in event loop activation path to stop SignalSender --- src/bun.js/bindings/BunDebugger.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bun.js/bindings/BunDebugger.cpp b/src/bun.js/bindings/BunDebugger.cpp index 096b6cb743..80fba4e2d6 100644 --- a/src/bun.js/bindings/BunDebugger.cpp +++ b/src/bun.js/bindings/BunDebugger.cpp @@ -1035,7 +1035,11 @@ extern "C" void VM__cancelStop(JSC::VM* vm) // Called from Zig when the event loop path activates the inspector. // Ensures runtimeInspectorActivated is set so that connect() and // interruptForMessageDelivery() use STW-based message delivery. +// Also enables polling traps so that: +// 1. The SignalSender stops its retry loop (it checks usePollingTraps) +// 2. Future NeedDebuggerBreak traps are delivered reliably via polling extern "C" void Bun__setRuntimeInspectorActivated() { Bun::runtimeInspectorActivated.store(true); + JSC::Options::usePollingTraps() = true; }