diff --git a/src/bun.js/bindings/BunDebugger.cpp b/src/bun.js/bindings/BunDebugger.cpp index 2a584af958..b57c282de6 100644 --- a/src/bun.js/bindings/BunDebugger.cpp +++ b/src/bun.js/bindings/BunDebugger.cpp @@ -41,6 +41,11 @@ public: { } + static Ref create(JSGlobalObject& globalObject) + { + return adoptRef(*new BunJSGlobalObjectDebuggable(globalObject)); + } + void pauseWaitingForAutomaticInspection() override { } @@ -449,7 +454,8 @@ extern "C" void Bun__ensureDebugger(ScriptExecutionContextIdentifier scriptId, b auto* globalObject = ScriptExecutionContext::getScriptExecutionContext(scriptId)->jsGlobalObject(); globalObject->m_inspectorController = makeUnique(*globalObject, Bun::BunInjectedScriptHost::create()); - globalObject->m_inspectorDebuggable = JSGlobalObjectDebuggable::create(*globalObject); + globalObject->m_inspectorDebuggable = BunJSGlobalObjectDebuggable::create(*globalObject); + globalObject->m_inspectorDebuggable->init(); globalObject->setInspectable(true);