Confirmed users
231
edits
No edit summary |
No edit summary |
||
| Line 107: | Line 107: | ||
}); | }); | ||
}</pre> | }</pre> | ||
== Handling pause events<br> == | == Handling pause events<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: | 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: | ||
| Line 116: | 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> | }</pre> | ||
== Handling new frames<br> == | == Handling new frames<br> == | ||
When a framesadded event is fired, the application can examine the list of frames in the server:<br> | |||
<br> | |||
<pre>function onFrames() | <pre>function onFrames() | ||
{ | { | ||
| Line 134: | Line 128: | ||
inspectFrame(frame); | inspectFrame(frame); | ||
} | } | ||
} | }</pre> | ||
== Handling new scripts<br> == | |||
When a scriptsadded event is fired, the application can examine the list of available source scripts in the server:<br> | |||
<pre>function onScripts() | |||
function onScripts() | |||
{ | { | ||
// Get the list of scripts in the server. | // Get the list of scripts in the server. | ||
| Line 146: | Line 139: | ||
dump("script: " + script.toSource() + "\n"); | dump("script: " + script.toSource() + "\n"); | ||
} | } | ||
} | |||
</pre> | |||
boo | |||
<br> | |||
/** | <br> | ||
<pre>/** | |||
* Helper function to inspect the provided frame. | * Helper function to inspect the provided frame. | ||
*/ | */ | ||