Debugging Techniques in UiPath

Debugging Techniques in UiPath

UiPath Studio offers debugging to identify and rectify errors in the project. It helps you to locate an error, analyze it and apply corrections to support fluent project execution. For an error free project, you must perform debugging at the designing stage.

Different options for debugging are available in the Debug menu:

debug menu
  • Step Into is used to debug activities one by one in a sequential manner.
  • Step Over is used to skip containers such as Sequences, Flowcharts, Invoke Workflow File activities without going into their sub parts and debugs the next activity. You can use this to skip large container flows which are error free to save time and debug faster.
  • Step Out can be seen as an opposite to Step Into. It is used to step out of the current container in the flow. It will complete the execution of activities in that container. Remember it will not skip the part, rather execute it and then go to the next activity.
  • Retry will execute the activity again. The exception is re-produced if any.
  • Ignore is used to ignore any exception that has been encountered and move on to the next activity so that the rest of the workflow can be debugged.
  • Restart is used to start the debug process from the beginning of the project.
  • Break will allow you to pause the debug process at any moment.
  • Focus helps you return to the activity that caused some error while navigating through the debug process.
  • Slow Step works similar to Step Into but comes with different speeds (1x to 4x) to adjust how faster/slower jumps you need. Instead of pausing your debug, you can simply slow it down.
  • Continue on Exception will continue even after an exception, throw it and exit debugging.
  • Picture in Picture allows you to have your process run in a separate session.
  • Remote Debugging enables you to run and debug processes on robots deployed to remote machines.
  • Open Logs will open the log folder located in your localappdata for viewing UiPath logs.
  • Highlight Elements will highlight the UI elements during debugging.
  • Execution Trail shows the entire execution path. Activities which are executed successfully are marked with a green tick, the ones in progress are marked with a yellow timer icon and those which threw an exception are highlighted as red.
Execution trail

Log Activities will provide you a detailed description of each step in the Output window. When enabled, verbose level logs are sent to the orchestrator instead of trace.

log activities

The DEBUG tab

There are four options which let you decide the mode of execution. Select the desired mode from drop the down arrow.

the debug tab

Debug File

Use keyboard shortcut F6 to debug the current file you have selected. Execution takes place in steps and only for the selected design.

Run File

Use keyboard shortcut Ctrl+F6 to run the current file you have selected. Execution takes place in one go and only for the selected design.

Debug

Use keyboard shortcut F5 to debug the entire project. Execution takes place step by step.

Run

Use keyboard shortcut Ctrl+F5 to run the entire project. Execution takes place in one go.

Below is an example where a validation error has been encountered and displayed while performing a debug: –

run
  • Using Test Activity

The test activity feature can be used to debug/execute a particular activity by providing all the required inputs and accessing the output. Right click on the activity in your sequence and click on Test Activity. The following side window will appear with your input variables. Once all the input is provided, click on Continue on the top to carry on execution and check the results.

Using test activity
There are two options related to test activity: –
  • Run from this Activity

This action will execute your process from the selected activity. It allows you to directly make changes to any variables and arguments in the left pane.

  • Run to this Activity

This action will execute your process until the selected activity is reached. It displays related information in the left pane.

Run to the activity
  • Studio Panels

Panels in Studio while debugging provide a bigger picture and detailed information about the process.

  1. Locals Panel displays all the properties, variables, exceptions related to the current debugging. The values can be easily modified for a particular activity by clicking on Edit icon next to it.
Locals panel

2. Call Stack Panel shows the description for each activity, including the next activity and parent containers. This section only gets populated when using Step and Break functions to debug the process or in case of an exception or break-point encountered.

Call stack panel

3. Breakpoints Panel allows you to view your set breakpoints while debugging. Setting a break-point helps to pause the debugging at an activity so that its behavior can be monitored. Make use of the Break-point Settings window to add a Condition, Hit Count and Log message during debugging. 

If the provided condition is true during debugging, the execution will break. 

Hit Count defines the number of times your condition can be met before breaking of the execution, meaning execution will take place till the mentioned hit count even if its higher than the true matches of condition.

Breakingpionts panel

4. Watch Panel allows you to watch your expressions and variable values. Click Add Watch to add an item or add it from the Locals Panel by right clicking->Add to Watch.

watch panel

5. Immediate Panel allows you to evaluate variables, arguments and statements. It also keeps a trail of previous evaluations. Type the variable in the Immediate window and press Enter to get the values displayed. To remove an evaluation, select it and press Spacebar. You can copy or clear all your lines in this window too.

Immediate panel

Leave a Reply

Retype the CAPTCHA code from the image
Change the CAPTCHA codeSpeak the CAPTCHA code
 

SOAIS - Worksoft Newsletter

To view on your browser, click here
Facebook Twitter LinkedIn
Dear Default Value,
 

Welcome to SOAIS Newsletter of September 2021!

Continuous Testing with Remote Execution
 
The speed of innovation continues to increase, driving rapid and relentless change for today’s ever-evolving IT landscapes, creating greater risk as IT and business teams scramble to ensure timely delivery. How can your organization keep pace? Test more, worry less. With Worksoft’s Connective Automation Platform, you can easily build and maintain automated tests, accelerating testing time without losing scope or volume. You can schedule and execute remote, continuous tests to intercept defects sooner and prioritize remediation - without sacrificing your nights and weekends. Explore how continuous test automation and remote execution can empower your organization.

Click here to connect with us to get more information on our services.
 

Skip Costly Rework with Dynamic Change Resiliency​

Change resiliency is imperative in ever-evolving IT environments. Our patented object action framework streamlines change management by assigning object definitions to your shared assets. The same object may be used in a thousand automation steps, but it can be easily updated by making one simple change to the model definition. The change automatically propagates to every single instance where that object may have been used without a single line of code or manual human involvement. For more change readiness you can also engage our Impact Analysis for SAP to predict how changes in SAP transports will affect your business processes. 

Please click here to watch the video to get a gist.
 

SOAIS Blog – Nuts and bolts of Certify Database Maintenance​

One of the key thing, which is often missed by the organizations, who have invested in using Worksoft Certify for automating their Business Process Validation initiatives, is implementing a Database Maintenance Plan. While the business and the test automation consultants get excited about the shiny new thing that they have got and start building the regression suite; planning and executing a database maintenance plan for most of the customers gets pushed down the priority list. However, since all the test assets in Certify are stored in a Database, a robust database maintenance plan is very important to maintain smooth operation of Certify with acceptable performance criteria. The customers usually start facing issues once they have built significant number of Certify processes which they have started executing on regular basis. Such executions add a lot of data to the tables storing results data and increase the overall size of the Certify database.

Please click here to read the complete blog.
 

Worksoft Blog – Process Intelligence: A Multi-Dimensional Approach

The ability to extract process knowledge has become easier through the years. Technology has evolved to the point where we can deploy capabilities that connect at multiple levels to extract different types of process insight. In the past, organizations were forced to spend enormous energy extracting data manually from different applications and databases. Then, they would have to use things like spreadsheets to transform the data and convert it into meaningful information. 

Please click here and read the complete blog.
 
India
Unit 9, Level 5, Navigator, ITPL,
Bangalore - 560 066.
Phone: +91 80 40071234
US
Suite 101, 1979, N Mill St,
Naperville, IL 60563
Phone 1-800-262-2427
Please click here to Unsubscribe / Unsubscribe Preferences

Leave us your info