Day 4 - Testing, Debugging, and Logs

Test a process step by step from the browser or the bot, pause on errors, fix a step and retry it, and read what happened in the Runs tab and the bot's log.

Help Centre › Getting Started

Today you learn to test a process, find out why a step fails, fix it, and read the logs. You can debug from the browser (the Run & debug tab of the process) or from the bot itself.

1. Why test

A small change, such as a renamed window or a moved button, can make a step fail. Testing finds this before the process runs on its own. Test a new process, and test again after every change.

2. Debug from the browser

Open the process and choose Run & debug in the sidebar. The tab has two modes:

  • Play runs the whole process on a bot at full speed.
  • Debug runs it on a bot one step at a time, so you can watch each step and the variables.

The panel also shows which environment the run uses and which credentials it will log in with.

The debug buttons

  1. Switch to Debug and pick a bot. A bot marked (offline) cannot be used; one marked (busy) is running something else.
  2. Click Start Debug. The run pauses at the first step.
  3. Use Step Over to run just the next step, Continue to run to the next breakpoint, or Abort to stop.

While it is paused you can see the Variables (and change a value to try something different), the Breakpoints and the Step Log. When the process calls a sub-process, the Call stack shows where you are.

Breakpoints

  • Select a step on the map and press F9 to add or remove a breakpoint. The run pauses before that step.
  • Right-click the step and choose Conditional Breakpoint… to pause only when a condition is true, for example when {invoice::amount} is over 10,000.
  • Choose Hit Count… to pause only on a certain pass, for example the 5th time round a loop. You can pause exactly on that pass, on that pass and every one after, or on every Nth pass.

When a step fails

In Debug mode the run does not stop when a step fails. It pauses on the failed step and shows the error. You then choose:

  • Retry this step – run the same step again.
  • Ignore and continue from the next step – skip it and carry on.
  • Restart from the first step – start the run again.

To fix the step, select it and press F2 to edit it, save, then click Retry. The bot picks up your change straight away.

If the real problem is an earlier step, fix that step, then right-click it and choose Run from this step. The run goes back to that step and keeps the variables it already had. You can also use Run from this step when nothing is running, to start part-way through a process.

Some buttons need a newer bot. If you do not see them, update the bot.

3. Debug from the bot

You can also debug on the machine itself:

  1. In the bot, open the play panel and tick Debug (F7).
  2. Choose the process and click Play.
  3. The bot pauses before each step. Press F7 to run the next one.

F7 is the default key. It can be changed in the bot's settings.

4. Read what happened: the Runs tab

The Runs tab of the process keeps every run. It shows:

  • Failing steps – each step with an open error, worst first. Details opens the error: what the bot saw, what it expected, and what to do. Where AI is set up for your workspace, Diagnose with AI suggests a cause and a fix.
  • A past run – pick one to see its status, time, step counts and slowest step. Replay it step by step on the map.
  • Insights – advice the bot gave about that run.
  • Download Log and Analyse with AI for that run.
  • Tests – save a run as a test, to check later changes against it.
  • Logs – ask a bot for its log file for a time window (Request), or Upload one you already have.
Automize run history: every run of a digital worker, when it started and how it finished.

See Running and debugging a process for more.

5. The bot's log file

On the machine, open the bot's Help menu and choose Show log in Explorer (Finder on a Mac). Each line has:

PartWhat it is
TimeWhen the line was written.
LevelDEBUG, INFO, WARNING, ERROR or CRITICAL.
WhereThe part of the bot that wrote it, for example playbot.run_process.
MessageWhat happened. A step starts with a banner holding its number and name.

Read it top to bottom: find the step that failed, then look at the lines just before it. The cause is often there.

The log stays on the machine unless someone requests or uploads it. What is kept out of the log is set in Privacy and data.

6. Common problems

ProblemLikely causeFix
Element not foundThe screen changed or had not loaded yetAdd a Wait for element step, or record the step again
Step timed outThe app was slower than usualGive the step more time, or wait for something on screen instead of a fixed time
#VAR! in a valueA variable name is spelt wrong or was never setSee Formula errors
Unexpected pop-upA dialog got in the wayCheck for it with Check if window exists and close it

7. Good habits

  • Test in small parts. Build a few steps, debug them, then add more.
  • Use real-looking data. Test files should look like the ones the process will get.
  • Add a Log message step at key points, for example "Starting invoice {invoice::number}". It makes logs easier to follow. Do not log personal data.
  • Plan for failure. Give important steps an error path or retries. See Error handling and Try-Catch and Retries and continue-on-fail.
  • Test in a test environment first. Your company sets its environments up in Settings. Move a process on with the Promote tab when it works (Day 6).

8. Exercises

Exercise 1 – Pause on an error

  1. Copy your Calculator process.
  2. Change the window name in the step that types into Calculator, so the step cannot find the window.
  3. Open Run & debug, switch to Debug, pick your bot and click Start Debug.
  4. Click Continue. The run pauses on the broken step and shows the error.
  5. Press F2, put the right window name back, save, and click Retry.

Exercise 2 – Breakpoints

  1. Select the last step and press F9.
  2. Start a debug run and click Continue. It stops at your breakpoint.
  3. Look at the values in Variables.

Exercise 3 – Read the run

  1. Run the process with Play.
  2. Open the Runs tab, pick the run, and click Replay.
  3. Click Download Log and find the line for each step.

End of Day 4

You can now:

  • Debug a process step by step from the browser or the bot.
  • Use breakpoints, including conditions and hit counts.
  • Fix a failed step and retry it without starting again.
  • Find what happened in the Runs tab and the log file.

Next – Day 5

Learn advanced topics and optimisation: error handling, speed and reliable processes.
Next

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.