Basic Debugging

  1. To switch to debug mode, in Design Studio, click Debug > Switch to Debug Mode on the toolbar or click the Debug button.
  2. To start debugging the robot, click Run.
  3. In the Robot view, you can watch the robot execute in debug mode.

    You can also watch the results in the main panel.

    In the Input/Output tab:

    • The Input panel shows the input variables.

      Note If the robot has no input variables, the Input panel is not shown.
    • The Output panel shows all values returned so far during the execution.

    • The API Exceptions tab shows all API exceptions generated during the execution.

    • The Log tab shows what has been written to the log during the execution.

    • The State tab shows the robot state, if any.

    • The Summary panel (to the right of the main panel), shows a summary of the execution. This summary contains the number of returned values, the number of API exceptions generated, statistics on the number of HTTP requests, the amount of sent and received data, and the number of JavaScript instructions executed.

    Note It is important to understand that execution in debug mode is independent of the execution done in design mode in Design Studio. Therefore, debug mode has its own current step and its own current robot state, independent of the current step and current robot state in design mode. In debug mode, the current step is the step that is about to be executed, or is being executed in the debugging process, and the current robot state is the input to that step.
  4. Click Stop to stop debugging.

    You can stop the debugging at any time.

  5. To stop debugging when a certain event occurs, enter a Stop When action.

    Here, you can select whether the debugging should stop when values are returned, when API exceptions are reported, and when breakpoints are reached.

    Of course, debugging always stops when the execution of the robot has completed.

    When debugging has stopped, you can see the reason for the stop in the status bar at the bottom of the Robot Editor.

    If the debugging has stopped before the execution of the robot is complete, you can watch the current robot state in the State tab. The Variables, Windows, Cookies, and Authentications sub-tabs show the robot state in the same way as in the State View in Design Studio. The API Exception sub-tab shows the API exception, if the execution stopped because an API exception was reported.

  6. If debugging has stopped before the execution of the robot is complete, click Run to resume debugging.

    You can also click Restart Debug to restart debugging. This cancels the current debugging process and makes the debugger ready to start a new debug operation from the start of the robot.

    Note The debugging is also restarted automatically whenever the current robot is modified or replaced by another robot in Design Studio.
  7. If the robot has input variables, you can edit the variables in the Input panel. Click Stop, change the values, and then press Enter to restart debugging with the new input values.

    You cannot edit the input values while a debug is running. To change the input values, you must first restart the debugging.