Difference between revisions of "Debug"

From PresenceWiki
Jump to: navigation, search
(Stepping Controls)
Line 36: Line 36:
 
=== Stepping Controls ===
 
=== Stepping Controls ===
  
<b>Pause:</b> This pauses the currently running Task if you have clicked on "Play" or "Fast Play".
+
* <b>Pause:</b> This pauses the currently running Task if you have clicked on "Play" or "Fast Play".
<b>Step:</b> This executes the currently active [[Task Element]], highlights the next in the sequence, and waits for the user to press Step again.
+
 
<b>Play</b> This executes the entire Task, highlighting the currently executing [[Task Element]] as it proceeds through the sequence.
+
* <b>Step:</b> This executes the currently active [[Task Element]], highlights the next in the sequence, and waits for the user to press Step again.
<b>Fast Play</b> This runs the remainder of the Task without any visual feedback as to where in the Task it is currently running.
+
 
 +
* <b>Play</b> This executes the entire Task, highlighting the currently executing [[Task Element]] as it proceeds through the sequence.
 +
 
 +
* <b>Fast Play</b> This runs the remainder of the Task without any visual feedback as to where in the Task it is currently running.
  
 
=== Context Inspector ===
 
=== Context Inspector ===

Revision as of 12:46, 14 July 2010

Before putting a Task on the Live Tasks Queue or enabling it to be called On Demand, it is typically a good idea to test it out and make sure it's doing what you expect it to.

This is where the Presence Debug Tool comes in handy. The Debug Tool allows you to step through the individual Task Elements one by one, examine the information that is passed between them, and view any logging information.

Launching the Debug Tool

To launch the Debug Tool, you first need to have the Task open and the appropriate tab selected. There are three ways to begin debugging the Task:

- Click on the Debug Icon http://www.international-presence.com/wikidocs/images/debug_1.gif

- Right click on the Task Design View (not on a Task Element) and select Debug from the pop-up menu

- Click on the "Task" menu at the top of the Administration Client, and select "Debug Current Task".

There is also a "Debug on..." option for the second and third methods. This allows you to select a server to debug the Task on if you have a multi-server environment.

Using the Debug Tool

Here is a screen-shot of the Debug Tool:

http://www.international-presence.com/wikidocs/images/debug_2.gif

There are four main components to this window.

  1. Stepping Controls These are at the top of the left hand panel. The controls consist of a Pause, Step, Play, and Fast Play button.
  2. Context Inspector This is below the Stepping Controls and lets you inspect the current Presence Context
  3. Task Log Viewer This allows you to view any log output generated by the Task in real time.
  4. Task View This is a smaller version of the Task, and the Task Element that is about to run will be highlighted.

Stepping Controls

  • Pause: This pauses the currently running Task if you have clicked on "Play" or "Fast Play".
  • Step: This executes the currently active Task Element, highlights the next in the sequence, and waits for the user to press Step again.
  • Play This executes the entire Task, highlighting the currently executing Task Element as it proceeds through the sequence.
  • Fast Play This runs the remainder of the Task without any visual feedback as to where in the Task it is currently running.

Context Inspector

Task Log Viewer

Task View

Breakpoints

Presence allows you to add Breakpoints to your Tasks. To do so, in the Task Design View, right click on a Task Element and select "Add Breakpoint" from the pop-up menu.

If you then click on the "Play" or "Fast Play" button, the Task will continue to run until it hits a Breakpoint, at which point it will stop and wait for user interaction.

This feature is especially useful if you want to debug a specific part of Task but do not want to have to step through all the preceding Task Elements.