Skip to content

rwb.debugger User Guide

boakley edited this page Jul 15, 2012 · 8 revisions

The robotframework workbench debugger is a graphical listener with some limited debugging capabilities. Combined with the breakpoint keyword in the rwb.DebugLibrary, you can use the debugger to pause the execution of a running test, run keywords interactively, and view the values of test variables.

A video of the debugger is available on youtube.

Usage

$ python -m rwb.debugger 

Description

The debugger opens up a socket on port 8910, listening for events which are sent to it by the rwb.socket_listener. For example, to run a test that works with the debugger you would run it like this:

$ pybot --listener rwb.socket_listener:8910 example.txt

At present, you cannot change the port number from the command line, but you can, however, edit the user configuration file (~/.rwb.cfg) and change the port number there.

When the test encounters a breakpoint, execution will be paused and the debugger will become active. You then can choose to do one of the following actions:

  1. continue - this will cause the test to resume execution at the next keyword or test case following the breakpoint.
  2. stop - this will cause the current suite to finish execution gracefully.
  3. fail test - this will cause the current test case to fail, but allow the test to continue with the next test case
  4. eval - you can type arbitrary keywords in the window below the row of buttons and have those keywords executed in the context of the breakpoint
Clone this wiki locally