Pega tools for debugging Constellation applications
With changes to the entire architecture and front-end stack, Constellation requires developers to utilize new tools for debugging Pega Platform™ applications. While debugging in Constellation may initially feel challenging for developers who are accustomed to relying heavily on the Clipboard and stateful interactions, Constellation provides a variety of debugging options that are modern, powerful, and well understood across the web developer ecosystem.
This topic examines the tools used to debug Pega Platform applications built on the Traditional architecture, in relation to debugging applications built on Constellation.
LiveUI
LiveUI is not supported for debugging Constellation applications.
The Pega Clipboard
The Pega Clipboard is partially supported in Constellation applications.
The Clipboard tool is only usable to investigate static data when a Case is run in Preview mode.
It is not possible to run the Clipboard tool from the end user (React-based) Portal, or to run it from Dev Studio and then switch to the user Portal thread to investigate live data.
Constellation applications communicate with the Infinity server using the Constellation DX API V2, and this is a stateless interface. Because of the stateless nature of Constellation, the Clipboard tool is released after each DX API call.
The Tracer tool
Pega's Tracer tool is supported for Constellation applications with some changes.
Because Constellation applications are stateless and rely on DX APIs, the Tracer tools' results window reflects the scheme in which your application interacts with a browser during a browser session.
The following options are still supported for the Tracer tool:
- Running a full trace from both App Studio and Dev Studio to trace the whole requestor session.
- Tracing Service REST Rules – this option is especially useful when debugging DX API calls. This also works when running a Service REST simulation.
The Tracer tool can be used to open the current Step Page of any Rule that is run during a Constellation DX API call, or it can be set to watch for a particular Page. There are some differences in the output:
- Tracer tool output is grouped by Constellation DX API call
- Each UI action generates a separate Constellation DX API call. The stateless architecture forces each request to follow the same procedure:
- Authenticate the API call
- Invoke an Automation Rule.
- Process the initial setup (ApplicationSetup, InitialProfileSetup, etc)
- Process the API request
- Return the response to the client
There is a new Tracer tool setting called View Rules. As seen in the following figure, you must open the Tracer tool's settings and select the View Rules checkbox for the Tracer to capture the relevant information:
The View Rule setting enables you to trace Views and investigate the View metadata being passed back to the client.
For greater clarity, the results window groups events by request ID, because in Constellation applications multiple requests can be active simultaneously.
Note: For more information about debugging Constellation applications using the Tracer tool, see Application debugging by using the Tracer tool.
The DebugPegaAPI dynamic system setting
For more verbose debugging of API calls, set the DebugPegaAPI dynamic system setting Rule equal to to true, as seen in the following figure:
This option logs additional fields in the Pega API Rest Service Info statements, helping to debug Page instructions and field level security.
When the DebugPegaAPI rule is active, the following information is saved into the Pega log files:
- Input values used in the request body of the DX API calls
- Actions performed by the DX API
- Fields in the View where your DX API encounters errors and exceptions
- Descriptions of the cause for errors and exceptions
- Error codes and exception numbers
Debugging Views in Dev Studio
You can access the metadata for each View in Dev Studio. To inspect the JSON associated with a View, first set the rule pxEnableC11nDev When Rule to true, as seen in the following figure:
To run a quick search for the View rule, enter the following syntax into the Search bar: ViewName pxObjClass:Rule-UI-View. Alternatively, use the App explorer, and search Rule-UI-View and search the list of Views available in your application, as seen in the following figure:
When you open a View rule in Dev Studio, the result displays the metadata associated with the individual View. In the following figure, you see the JSON data associated with the ResolutionMethod View:
Note: For more information about debugging Constellation applications, see Tools for debugging Constellation.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?