Debugger Client API: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 95: Line 95:
== Handling location changes  ==
== Handling location changes  ==


When teh user navigates away from a page, a tabNavigated event will be fired. The proper way to handle this event is to detach from the previous thread and tab and attach to the new ones:<br>
When teh user navigates away from a page, a tabNavigated event will be fired. The proper way to handle this event is to detach from the previous thread and tab and attach to the new ones:<br>  
<pre>function onTab()
<pre>function onTab()
{
{
Line 106: Line 106:
     });
     });
   });
   });
}</pre>
}</pre>  
boo
== Handling pause events<br> ==
 
foo


<br>
When the debugger enters a paused state, it's a good opportunity for the application to request a list of stack frames and source scripts:
<pre>
<pre>function onPause()
/**
* Handler for entering pause state.
*/
function onPause()
{
{
   // Get the top 20 frames in the server's frame stack cache.
   // Get the top 20 frames in the server's frame stack cache.
Line 122: Line 116:
   // Get the scripts loaded in the server's source script cache.
   // Get the scripts loaded in the server's source script cache.
   client.activeThread.fillScripts();
   client.activeThread.fillScripts();
}
}</pre>
== Handling new frames<br> ==


/**
foo
* Handler for framesadded events.
 
*/
boo
function onFrames()
 
 
 
<br>
<pre>function onFrames()
{
{
   // Get the list of frames in the server.
   // Get the list of frames in the server.
Confirmed users
231

edits

Navigation menu