Debug Mode
This topic provides a general description of Debug mode and explains the interaction between Design and Debug modes.
Debug mode is a specialized mode for debugging Basic Engine Robots. After editing a Basic Engine Robot, we recommended to run the edited robot in the same way it runs on a RoboServer. This means running the robot until the end, possibly with different input values to make sure that all of the robot functionality is tested. This can be done with the debugger.
Note that it is possible to run one or multiple robots in the debugger at the same time as editing other robots, snippets, or types in Design mode, but the editing process may affect the robot execution in the debugger, as the rest of this topic explains.
To better understand the interaction between editing a robot and debugging it, it is important that you understand the following terminology about the state of a debug process:
-
When you first enter the debugger, the robot is in a state where it is ready to run in the debugger and it is not executing. Before you start running the robot in the debugger, you may choose to change the input value for the robot, which can be done on the Input/Output tab. However, note that it will also change the input value in the robot edited in Design mode. In other words, if you modify a robot in Debug mode, it is also modified in Design mode.
-
When you click to run the debugger, the robot starts running (executing). If breakpoints are configured and the robot stops at one of these breakpoints, the robot is paused but it is still executing, because it still has a state, and you may click to run the debugger again, so it continues running from the point where it was paused.
When a robot is running in the debugger, it cannot be edited in Design mode. To edit a robot in Design mode, it must be ready or paused. If a robot paused in the debugger is being edited, the debug execution stops, and the robot returns to being ready. This also means that the debug state is lost, and so is any information about the debug execution, such as output values, log messages, and so on.
When a robot is running in the debugger, you can edit resources that it depends on, such as robots, snippets, and types. When you do so, the robot keeps running in the debugger until you switch the tab to Debug. At that time, the Debugger will stop running the robot and return to the ready state, resulting in the loss of the debug state. If the robot running in the debugger ends before you switch the tabs, the state is not lost and can be observed in the debugger.
When a robot is executing in the debugger, changing other robots, snippets, or types that the robot does not depend on has no consequence on the robot execution in the debugger.
For a detailed description of the various debugging options, see the following topics:
- Debug a Basic Engine Robot
- Debug from Current Location in Design Mode
- Return to Design Mode from a Debugging Location
- Use Breakpoints (provides the ability to set a breakpoint to make the debugger stop at a specific step)
- Single Stepping (provides the ability to execute one step at a time in Debug mode)
- Step Into (provides the ability to step into a Group step and debug each step)