top of page

Pega Debugging tricks using Tracer

Updated: Jul 27


Remote Tracing

This is useful in Pre-Prod or Prod environment where users do not have tracer option enabled. In such case one operator can start the tracer and point the tracer to user who do not have access to tracer. Let's see how to do this.

  • Login to Pega with developer operator id or any operator id for which tracer option is enabled.

  • Open tracer and locate 'Remote Tracer' option at top right corner of the tracer window.

ree

  • Choose the operator you want to trace and click Okay button.

ree

  • after this whatever action the selected user will do their session will be traced here.


Tracing from Admin Studio

If you have access to Admin studio for your environment, then you trace any user who logged into system. Just follow below path to achieve this.


  • Switch to Admin Studio.

  • Goto Resource-> Requestor-> filter out only Browser requestor

  • Locate the requestor you want to trace and click on the three-dot icon in the extreme right of the requestor row.

  • Select Trace option.

ree

Checking Parameter value

While debugging activity logic sometime, we take some decision based on value of some parameter value and we wanted to know what value a specific parameter had during execution. In such in trace we can see the value of parameter at particular step. Let's see how to do this.

Assume we are tracing an activity called - 'RunFlowActionAcitivity'. During runtime at step #1 i want to check the value of a parameter called 'tabIndex '.


  • Open tracer and search the activity in which you to find the parameter value. Find the step #1 execution entries in the tracer. See below image I did the same.


ree

click on any entries of column #5 from the left side of the tracer window which are correspond to Activity Step#1. You will see page like below.

ree

Click on a link named - 'unnamed'. This unnamed page will show all the parameter and its values at that execution step.

ree

Checking the value of Local Variable of Activity

You can define Local variables in Pega activity. These local variables are not shown into tracer if you just run the tracer. For tracer to show the value of local variable you need to enable a setting in tracer. Open tracer and click on Setting, enable Local Variable setting as shown in below image.

ree













To explain this, I have developed an activity called DemoLocalVariable. This activity defines and sets value of Local variable. Trace this activity, by enabling the local variable setting in trace as shown above. Click on Step method of the activity where Local variable is set, you will a pop up like below. I have highlighted the step I followed.

ree

Click on View Variable Link on the Pop up, then it will show the value of local variables on that step.

ree

Environment Details

Pega Version - 8.7 and 8.8 (Personal Edition)


Comments


©2022 by pegablogs. Proudly created with Wix.com

bottom of page