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.
Debugging with the Model Viewer layoutThe 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 list
sources, 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 GuideCreate a panel.
Open the Guide Properties view and, in Layout, select Model
Viewer.
Preview the Guide.
Navigate to the Model Viewer panel.
Merge data into a GuideEnter data in the XML data tab.
To merge the data into the Guide, do one of the following
actions:
Debugging with Flash BuilderGuide 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 previewCreate
a Flex web application project.
In the library path, include the dcruntime_library.swc file
and custom SWC files used by your Guide extensions.
Right-click the Flex Web project and select Properties.
In the Run/Debug Settings panel, create a launch configuration
and click Edit.
In the Edit Launch Configuration Properties page, deselect
Use Default.
In the Debug: Profile: Run: edit boxes, enter about:blank.
Click OK.
Debug the Flex Web application. It launches a browser with
the URL about:blank.
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 ActionScriptWhen the model is compiled, it is compiled to the following
location:
${user.home}\Application Data\Adobe\LiveCycle\ES3\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.
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.
Include all the source in your Flash Builder project.
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.
|
|
|