web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Debugging a runnable class in Dynamics 365 for Operations - Through Condition Expression feature

Chaitanya Golla Profile Picture Chaitanya Golla 17,225

Hi,

Conditional expression feature of debugging helps us if we want to stop the execution at the breakpoint(such that we can start debugging) only after value of certain variable equal/greater than/less than to the value specified.

Please follow below steps to make much usage of this feature and screenshots are provided for every step.

Step 1: Create a runnable class, I used following code which displays the names of customers(through while select loop) and also used a variable (namely) i which is incremented in the loop. 

6560.Code.JPG

Step 2: Placed break point on the infolog statement(as shown below). Right click on breakpoint and select options Conditions.

1537.Conditions.JPG

Step 3: On clicking conditions button, under conditions group, select Conditional Expression and specify value as i == 5(as shown below). Click on close button.

ExpValue.JPG

Step 4: After successfully providing the value, please check the plus sign on the breakpoint.

2476.PlusSymbol.JPG

Step 5: Build the solution and start debugging(through Debug > Start debugging) to see the execution stops after looping the while loop six times. This can be confirmed by checking the value of variable i in the locals window(red color box) to be 5 and five info messages in the infolog window.

CondFeature.JPG

Likewise, you can debug using conditional expression feature.

Regards,

Chaitanya Golla

Comments

*This post is locked for comments