Debugger Client API: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 26: Line 26:
</pre>  
</pre>  
If a TCP socket is required, the function should be split in two parts, a server-side and a client-side, like this:<br>  
If a TCP socket is required, the function should be split in two parts, a server-side and a client-side, like this:<br>  
<pre>function serverStartDebugger()
<pre>function startDebuggerServer()
{
{
   // Start the server.
   // Start the server.
Line 37: Line 37:
}
}


function clientStartDebugger()
function startDebuggerClient()
{
{
   let transport = debuggerSocketConnect("localhost", 2929);
   let transport = debuggerSocketConnect("localhost", 2929);
Line 58: Line 58:
{
{
   client.close();
   client.close();
}</pre>
}</pre>  
== Debugging a browser tab<br> ==
== Debugging a browser tab<br> ==


Debugging a browser tab requires enumerating the available tabs, attaching to the current one, and then attaching to its thread. Threads in the debugger client API represent contexts.<br>
Debugging a browser tab requires enumerating the available tabs, attaching to the current one, and then attaching to its thread. Threads in the debugger client API represent contexts.<br>  
<pre>function debugTab()
<pre>function debugTab()
{
{
Line 90: Line 90:
   });
   });
}
}
</pre>
</pre>  
The debugger client will send event notifications for a number of events the application may be interested in. These events include state changes in the debugger, like pausing and resuming, stack frames or source scripts being ready for retrieval, etc.
 
== Handling location changes ==
 
foo
 
boo  
boo  


Confirmed users
231

edits