Debugging Guides

When a Guide does not function correctly, you can use these methods for debugging it:

Model Viewer layout
Using the Model Viewer layout is the easiest way to debug a Guide. Using the Model Viewer layout, you can browse the XML data object model (DOM) and the model. (See Panel properties .)

Flash Builder debugger
To debug Guide extensions or custom model services in the Preview view, attach the Flash Builder debugger to a running Guide.

Using the Model Viewer layout to debug a Guide

The Model Viewer is a panel layout that you can add to any Guide to inspect the XML data object model and the model. The Model Viewer panel has three tabs:

XML Data
This tab shows the data for the root entity. The root entity is the entity that was selected as the primary entity when the Guide was initially created. It includes the data for root entity and any bound entities. If the bound entities are non-persistent, the data appears as aggregated child elements. If the bound elements are persistent entities, the data contains links to the elements representing the persistent entities. The persistent entities appear as sibling elements to the root entity.

XML Data Dom
Displays the XML DOM as a read-only tree that you can browse.

Data Model
The model displayed as a tree. In addition to the model, the tree also shows any additional model entities, including selection lists, Guide rules, Guide binding, and model service results.

For example, a component of a Guide is not displayed in the Guide even though it is placed on a panel. The most likely cause is that the corresponding model nodes are not created. Use the model tab to verify that the model nodes are created.

Add the Model Viewer layout for a Guide

  1. Create a panel.

  2. Open the Guide Properties view and, in Layout, select Model Viewer.

  3. Preview the Guide.

  4. Navigate to the Model Viewer panel.

Merge data into a Guide

  1. Enter data in the XML data tab.

  2. To merge the data into the Guide, do one of the following actions:

    • Click Import.

    • Copy and paste the data that you want to test with the running Guide.

Using the Flash Builder debugger

Guide preview uses the debug version of the Guide SWF files. You can attach the Flash Builder debugger to the running Guide during preview. To debug Guide extensions, make sure that you are using SWC files that are compiled with debug information.

Attach the Flash Builder debugger to the preview

  1. Create a Flex web application project.

  2. In the library path, include the dcruntime_library.swc file and custom SWC files used by your Guide extensions.

  3. Right-click the Flex Web project and select Properties.

  4. In the Run/Debug Settings panel, create a launch configuration and click Edit.

  5. In the Edit Launch Configuration Properties page, deselect Use Default.

  6. In the Debug: Profile: Run: edit boxes, enter about:blank .

  7. Click OK.

  8. Debug the Flex Web application. It launches a browser with the URL about:blank.

  9. In the Guide Design perspective, click Preview.

    The Flash Builder Debugger connects to the Guide. If breakpoints exist in your code, the code stops at the appropriate points. Traces appear on the Flash Builder console.

Accessing the model generated ActionScript

When the model is compiled, it is compiled to the following location:

${user.home}/Application Data\Adobe\LiveCycle\ES2\Guides\generated.

Classes corresponding to entities and services are compiled into a subfolder with a name corresponding to the model name in lowercase. If you put model custom services into the FML file, corresponding stubs are also generated into this folder.

  1. Create a Flash Builder project (SWF file) and include all the files generated for that particular model. The generated folder also contains a < modelname >.as file.

  2. Include all the source in your Flash Builder project.

  3. Compile the SWF file.

When you launch the New Guide wizard, you can supply this SWF file as the model SWF file. You can then debug custom model service code. Add the generated folder as a source folder to your Flex Web application project.

// Ethnio survey code removed