summaryrefslogtreecommitdiff
path: root/src/inspector/node_protocol.pdl
diff options
context:
space:
mode:
authorEugene Ostroukhov <eostroukhov@google.com>2018-09-08 19:45:10 -0700
committerEugene Ostroukhov <eostroukhov@google.com>2018-09-18 09:01:33 -0700
commitf28c6f7eef58e7c3133bb2cd457d05b986194ba3 (patch)
treeb8e8583ff735a3b0721831af51c4f92d967849f1 /src/inspector/node_protocol.pdl
parentba0b4e43e442926bfb9389a42aa7393f91e6748a (diff)
downloadandroid-node-v8-f28c6f7eef58e7c3133bb2cd457d05b986194ba3.tar.gz
android-node-v8-f28c6f7eef58e7c3133bb2cd457d05b986194ba3.tar.bz2
android-node-v8-f28c6f7eef58e7c3133bb2cd457d05b986194ba3.zip
inspector: workers debugging
Introduce a NodeTarget inspector domain modelled after ChromeDevTools Target domain. It notifies inspector frontend attached to a main V8 isolate when workers are starting and allows passing messages to inspectors on their isolates. All inspector functionality is enabled on worker isolates. PR-URL: https://github.com/nodejs/node/pull/21364 Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/inspector/node_protocol.pdl')
-rw-r--r--src/inspector/node_protocol.pdl55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/inspector/node_protocol.pdl b/src/inspector/node_protocol.pdl
index 27b3d814c8..9fb9f1c55f 100644
--- a/src/inspector/node_protocol.pdl
+++ b/src/inspector/node_protocol.pdl
@@ -37,3 +37,58 @@ experimental domain NodeTracing
# Signals that tracing is stopped and there is no trace buffers pending flush, all data were
# delivered via dataCollected events.
event tracingComplete
+
+# Support for sending messages to Node worker Inspector instances.
+experimental domain NodeWorker
+
+ type WorkerID extends string
+
+ # Unique identifier of attached debugging session.
+ type SessionID extends string
+
+ type WorkerInfo extends object
+ properties
+ WorkerID workerId
+ string type
+ string title
+ string url
+
+ # Sends protocol message over session with given id.
+ command sendMessageToWorker
+ parameters
+ string message
+ # Identifier of the session.
+ SessionID sessionId
+
+ # Instructs the inspector to attach to running workers. Will also attach to new workers
+ # as they start
+ command enable
+ parameters
+ # Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
+ # message to run them.
+ boolean waitForDebuggerOnStart
+
+ # Detaches from all running workers and disables attaching to new workers as they are started.
+ command disable
+
+ # Issued when attached to a worker.
+ event attachedToWorker
+ parameters
+ # Identifier assigned to the session used to send/receive messages.
+ SessionID sessionId
+ WorkerInfo workerInfo
+ boolean waitingForDebugger
+
+ # Issued when detached from the worker.
+ event detachedFromWorker
+ parameters
+ # Detached session identifier.
+ SessionID sessionId
+
+ # Notifies about a new protocol message received from the session
+ # (session ID is provided in attachedToWorker notification).
+ event receivedMessageFromWorker
+ parameters
+ # Identifier of a session which sends a message.
+ SessionID sessionId
+ string message