top of page

Exploring Debugging Tools in Pega for Enhanced Application Performance

When it comes to maintaining and optimizing applications built on the Pega Platform, having robust debugging tools at your disposal is crucial. These tools not only help identify and resolve errors but also provide valuable insights into system performance and stability. In this article, we'll delve into some of the essential debugging tools available in Pega and how they can empower developers and system administrators to ensure the smooth operation of their applications.

  • The Tracer: Illuminating the Path to Success

When an application encounters an error, it's essential to pinpoint the underlying cause to rectify the issue effectively. Understanding the sequence of events leading to the error is key to determining which aspect of the application's behavior needs correction. The Tracer tool facilitates this by providing insights into the events unfolding during case processing.

In the Tracer log, most steps are marked with a status of "Good," denoting successful completion. However, if a step registers a status of "Fail," it signifies that an error occurred, resulting in unsuccessful completion of the step.

  • Log Files: A Treasure Trove of Insights

Pega utilizes log files to record a variety of information, including errors, warnings, and debug details. These logs serve as a record of exceptions and other events that influence the application, offering valuable insights into their origins. Each log is overseen by an appender, responsible for specifying the types of events that are written to the corresponding log file.

Dev Studio provides access to various log files, including:

  1. PEGA Log: This comprehensive log captures warnings, errors, and informative messages about internal operations. It's your go-to resource for debugging, offering a filtered view based on your operator ID.

  2. ALERT Log: Concerned about performance? The ALERT log keeps track of performance-related alerts, which can be further analyzed and summarized into an Excel spreadsheet using the PLA tool.

  3. ALERTSECURITY Log: This log flags potential security vulnerabilities, such as improper configuration or attempts to bypass security measures.

  4. BIX Log: (For BIX Add-on Users) This log tracks events during extract operations performed by the Business Intelligence Exchange module.

  5. SERVICES-PAL Log: Looking for service performance data? The SERVICES-PAL log provides a record of saved performance metrics.

  6. CLUSTER Log: This log offers insights into the setup and operation of your Pega cluster.

  • Clipboard: A Peek into Temporary Memory

The Clipboard tool is a crucial debugging resource in Pega. It allows you to inspect data entered into a UI by displaying it within the Clipboard under "User Pages," typically with the page name pyWorkPage. Essentially, the Clipboard tool offers a snapshot of the data residing in memory. It organizes and presents this data, listing all the pages in memory along with their properties and corresponding values. This temporary memory area, associated with each connected Pega Platform requestor, encompasses browser-based users as well as unauthenticated guest users. The Clipboard adopts a hierarchical structure, comprising nodes referred to as pages, most of which are identified by a name and a class.

Accessible from the Developer toolbar, the Clipboard tool features three main areas: the header, the left pane, and the right pane. These sections collectively provide a comprehensive view of the data stored in memory, aiding developers in debugging and troubleshooting tasks.

  1. Header: The header section offers options for selecting a specific thread to examine. Each thread corresponds to a distinct action currently managed by the Pega Platform. Threads within the clipboard are dedicated to the current studio context. For instance, in App Studio, there's a dedicated thread for App Studio operations. In Dev Studio, threads are present for both App Studio and Dev Studio activities. Additionally, separate threads are allocated for open rule forms and open cases. This segregation ensures that data pertaining to one case or action doesn't interfere with another, as each case or action is assigned its own thread.

  2. Left pane: The left pane displays a list of every page defined on the clipboard for the selected thread. For each page, the Clipboard tool presents the name and class associated with it. If a page includes embedded pages, an expand arrow appears to the left of the page name, allowing further exploration.

  3. Right pane: The right pane showcases all properties defined on the selected page, along with their corresponding values. Users can inspect data and utilize functionalities like Edit, Refresh, and Actions buttons to modify values, refresh the clipboard page, and perform additional actions as needed.

  • Live UI: Taking Control of the User Experience

The Live UI tool is an invaluable resource for debugging interfaces, offering extensive control over the UI during runtime. With Live UI, you can pinpoint various elements within the user interface, including sections, Flow actions, properties, links, icons, controls, and layouts. This real-time insight allows for swift identification and adjustment of UI components.

Moreover, the Live UI tool provides detailed visibility into the structure of your application's UI, enabling seamless addition, relocation, and deletion of components like layouts and controls directly during runtime. The available actions may vary depending on the selected component, ensuring tailored adjustments to suit specific needs.

  • PegaRULES Log Analyzer (PLA): Consolidating Knowledge

The PegaRULES Log Analyzer (PLA) tool is a web application designed to aggregate and summarize three distinct types of logs originating from individual JVM server nodes within your application system. These logs contain critical information pertaining to operational and system health, aiding developers and system administrators in swiftly identifying, diagnosing, and addressing issues that may compromise:

  1. Performance: The Alert log serves as a repository for diagnostic messages that flag individual system events surpassing performance thresholds or encountering failures. Alert messages include a comprehensive set of field values delineating the alert, the underlying conditions triggering it, and the system's state at the time of occurrence.

  2. Stability: The Pega (system) log aggregates system errors, exceptions (accompanied by their stack trace statements), debug statements, and any other messages not explicitly classified as alerts. This log offers insight into the stability of the system by documenting various operational aspects and occurrences.

  3. Scalability: The JVM garbage collection (GC) log provides valuable insights into the memory management of a Java application. By analyzing this log, administrators can glean information about how memory is utilized, aiding in optimizing system scalability and resource allocation.

  • Performance Testing Tools: Measuring Efficiency

Fine-tuning your application's performance is crucial for a seamless user experience. Pega offers several tools to help you benchmark and optimize performance:

  1. Database Trace: This tool generates a text file capturing SQL statements, rule cache hit statistics, timings, and other interactions between your requestor session and the database.

    1. The Database Trace feature generates a text file containing a comprehensive record of SQL statements, rule cache hit statistics, timings, and other relevant data reflecting the interactions of your requestor session with the Pega Platform database or other relational databases. It's worth noting that no prior familiarity with SQL is necessary to interpret the output.

    2. You can access the Database Trace functionality via the Performance landing page, located at Dev Studio > System > Performance > Database Trace, or through the Performance tool in the toolbar.

    3. Upon accessing the Database Trace, you'll encounter a "Trace Options" button, which opens a settings window. This window presents a list of all possible events to trace. To refine the results and focus on specific events relevant to your situation, you can remove any inapplicable events from the list.

    4. Once you've configured the tracing options, you can initiate the trace by clicking the green "Play" button. This action starts the Database Trace, allowing it to capture the desired interactions. After completing the steps you intend to trace, you can halt the trace by clicking the red "Stop" button.

    5. Once the trace is stopped, the tool updates the table with the results for all the threads it traced, providing you with a detailed overview of the database interactions during the traced session.

  2. Performance Analyzer (PAL): Gain a comprehensive view of performance statistics with PAL. Use it to understand system resource consumption during a specific user session.

The Performance Analyzer (PAL) is a powerful tool within Pega Platform that offers a comprehensive view of performance statistics captured by the system. It allows users to analyze the system resources consumed during the processing of a single requestor session.

You can access PAL from the Performance landing page, located at Dev Studio > System > Performance, or directly from the Performance tool in the toolbar.

To initiate performance analysis using PAL, the first step is to take measurements:

1. Clear any previously recorded entries by clicking on "Reset data."

2. Add a marker to base your analysis on:

- For a simple reading, click on "Add reading."

- For a reading that includes clipboard data and requires more computation time, click on "Add reading with clipboard size."

3. View additional information about the readings:

- To see details about the first reading, click on "INIT."

- To view the difference between the last two complete readings, click on "DELTA."

- To access information about all readings, click on "FULL."

4. Once you've conducted your analysis, you can save the results by clicking on "Save Data" to download the data to an Excel file for further examination or sharing.

PAL provides valuable insights into system performance, aiding in the identification of potential bottlenecks and areas for optimization within your application.

3. Performance Profiler: Analyze the execution of activities, data transforms, and when condition rules in detail. This tool provides a deeper dive compared to the Tracer and should be used in conjunction with PAL for pinpointing specific performance bottlenecks.

To harness the Profiler for a detailed trace of performance information regarding the execution of activities, when condition rules, and data transforms within your requestor session, follow these steps:

  1. Navigate to Configure > System > Performance > Performance Profiler.

  2. Click on the "State: Stopped" icon to initiate Profiler data collection in the background. The label and icon will change to "State: Running."

  3. Execute the activities, data transforms, or when condition rules that you wish to profile within your requestor session.

  4. Once the profiling is complete, click on "State: Running" to halt the Profiler.

  5. The resulting window will display a Profiler file for each Thread utilized during the profiling session, distinguished by your Requestor ID and Thread Name.

  6. Choose either "Open" or "Save" in the dialog box that appears.

  7. Open the file using Microsoft Excel to review and analyze the collected data.

Running the Performance Profiler alongside the Performance Analyzer can help pinpoint specific steps contributing to performance issues, enabling more targeted optimization efforts. Remember to disable the Profiler once data collection is complete to avoid unnecessary overhead.

By mastering these debugging tools, Pega developers can ensure their applications run smoothly, deliver an exceptional user experience, and maintain optimal performance. Stay tuned for future blog posts where we'll delve deeper into specific tools and provide practical application examples!

-Team Enigma Metaverse

0 views0 comments


bottom of page