Remote Debugging Protocol: Difference between revisions

m
→‎Thread Pauses: Use clearer metavariable names in value descriptions.
(→‎Finding Descriptors For Single Properties: Define the form of property descriptors.)
m (→‎Thread Pauses: Use clearer metavariable names in value descriptions.)
Line 501: Line 501:
If the thread pauses to report an interesting event to the client, it sends a packet of the form:
If the thread pauses to report an interesting event to the client, it sends a packet of the form:


   { "from":<i>thread</i>, "type":"paused", "actor":<i>actor</i>, "why":<i>reason</i>,
   { "from":<i>thread</i>, "type":"paused", "actor":<i>pause-actor</i>, "why":<i>reason</i>,
     "currentFrame":<i>frame</i>, "poppedFrames":[<i>poppedFrame</i>...] }
     "currentFrame":<i>frame</i>, "poppedFrames":[<i>poppedFrame</i>...] }


This indicates that the thread has entered the <b>Paused</b> state, and explains where and why.
This indicates that the thread has entered the <b>Paused</b> state, and explains where and why.


<i>Actor</i> is a "pause actor", representing this specific pause of the thread; it lives until the thread next leaves the <b>Paused</b> state. The pause actor parents actors actors referring to values and other entities uncovered during this pause; when the thread resumes, those actors are automatically closed. This relieves the client from the responsibility to explicitly close every actor mentioned during the pause.
<i>Pause-actor</i> is a "pause actor", representing this specific pause of the thread; it lives until the thread next leaves the <b>Paused</b> state. The pause actor parents actors referring to values and other entities uncovered during this pause; when the thread resumes, those actors are automatically closed. This relieves the client from the responsibility to explicitly close every actor mentioned during the pause.


Since actors in value grips are parented by the pause actor, this means that those grips become invalid when the thread resumes, or is detached from; it is not possible to take a grip from one pause and use it in the next. To create a grip that remains valid between pauses, see [[#Grip_Lifetimes|Grip Lifetimes]].
Since actors in value grips are parented by the pause actor, this means that those grips become invalid when the thread resumes, or is detached from; it is not possible to take a grip from one pause and use it in the next. To create a grip that remains valid between pauses, see [[#Grip_Lifetimes|Grip Lifetimes]].
Line 532: Line 532:
The thread stopped because it executed a JavaScript "debugger" statement.
The thread stopped because it executed a JavaScript "debugger" statement.


   { "type":"breakpoint", "actors":[<i>breakpoint</i>...] }
   { "type":"breakpoint", "actors":[<i>breakpoint-actor</i>...] }


The thread stopped at the breakpoints represented by the given actors.
The thread stopped at the breakpoints represented by the given actors.


   { "type":"watchpoint", "actors":[<i>watchpoint</i>...] }
   { "type":"watchpoint", "actors":[<i>watchpoint-actor</i>...] }


The thread stopped at the watchpoints represented by the given actors.
The thread stopped at the watchpoints represented by the given actors.
Confirmed users
496

edits