Previous Topic: AudienceNext Topic: Target Environments


Diagram Trace Utility Overview

The Diagram Trace Utility is an interactive debugging tool for applications written in C, Java, or C# languages that are generated with the CA Gen code generator and run on Microsoft Windows, UNIX, or Linux operating systems. You cannot use the Diagram Trace Utility to debug handwritten CA Gen applications or applications that are generated with code generators other than the CA Gen Toolset and Encyclopedia code generators.

CA Gen applications are model-driven applications that are developed using CA Gen Procedure Action Diagram (PAD) language statements. The Diagram Trace Utility operates at the PAD statement level, which is the CA Gen natural programming language level, instead of the C, Java, or C# language level. The generated application or portion of the application being traced must have been generated with Tracing enabled.

Note: If you require source-level debugging at the C, Java, or C# language level, you must use a third-party, native language debugger.

During code generation, the PAD language statements are converted to appropriate programming language statements based on the selected target language (C, Java, or C#). Using the Diagram Trace graphical user interface (GUI), you can trace or step through the execution of statements in the PAD and examine the contents of views and system attributes to locate the problems in your application. The utility lists the Action Diagram statements contained in the Action Diagram where the controlled application is suspended.

Communication between the application being traced and the Diagram Trace Utility server occurs through the exchange of a series of command and control messages. These messages pass variable data, commands, status, and statement source code strings between the application and the utility. For each PAD statement that is executed, the following actions occur:

  1. The executing application calls the CA Gen runtime trace function.
  2. The trace function sends the following data to the Diagram Trace Utility server for each statement contained in the application:
  3. If needed, the Diagram Trace Utility requests detailed information from the application runtime. The detailed data can include:
  4. The Diagram Trace Utility returns control to the application runtime and indicates whether to execute or skip the next statement.
  5. The application runtime returns control to the executing application and indicates whether to execute or skip the next statement.
  6. Application execution ends or Steps 1-5 are repeated.

The following information on the communications to and from the Diagram Trace Utility is logged on the application side:

When the Diagram Trace Utility and the application being traced reside on separate machines, network latency may cause long delays and give the appearance that the Diagram Trace Utility is locked up. In this case, we recommend that you generate only the action blocks that you want to debug with Trace selected. This will reduce the traffic between the application and the Diagram Trace Utility, thus minimizing this latency effect.

The Diagram Trace Utility caches the PAD code data it receives from the application in its workspace subdirectory in the Diagram Trace Utility installation area. The utility caches the Action Diagram code based on the generation time shown on the first line of the Action Diagram.

Note: The application does not resend the source statements to the utility until the generation time in the application is different than the generation time in the cached version of the Diagram Trace Utility. Keep this in mind if you modify the generated source code.