aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/BunDebugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/bindings/BunDebugger.cpp')
-rw-r--r--src/bun.js/bindings/BunDebugger.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bun.js/bindings/BunDebugger.cpp b/src/bun.js/bindings/BunDebugger.cpp
index 0df94b6d1..31cc1c778 100644
--- a/src/bun.js/bindings/BunDebugger.cpp
+++ b/src/bun.js/bindings/BunDebugger.cpp
@@ -29,6 +29,8 @@ enum class ConnectionStatus : int32_t {
Disconnecting = 2,
Disconnected = 3,
};
+static bool waitingForConnection = false;
+extern "C" void Debugger__didConnect();
class BunInspectorConnection : public Inspector::FrontendChannel {
@@ -84,6 +86,10 @@ public:
inspector.setInspectable(true);
inspector.connect(*connection);
+ if (waitingForConnection) {
+ waitingForConnection = false;
+ Debugger__didConnect();
+ }
Inspector::JSGlobalObjectDebugger* debugger = reinterpret_cast<Inspector::JSGlobalObjectDebugger*>(globalObject->debugger());
if (debugger) {
@@ -420,9 +426,7 @@ extern "C" void Bun__ensureDebugger(ScriptExecutionContextIdentifier scriptId, b
BunInspectorConnection::runWhilePaused(globalObject, isDoneProcessingEvents);
};
}
-
- if (pauseOnStart)
- inspector.pauseWaitingForAutomaticInspection();
+ waitingForConnection = true;
}
JSC_DEFINE_HOST_FUNCTION(jsFunctionCreateConnection, (JSGlobalObject * globalObject, CallFrame* callFrame))