RobotFramework DebugLibrary

2.5.0 · active · verified Thu Apr 16

Robotframework-DebugLibrary (current version 2.5.0) is a debugging library for Robot Framework, offering an interactive shell (REPL) and step-debugging capabilities. It allows users to set breakpoints within test cases, inspect variables, evaluate expressions, and try out keywords during test execution. The library is actively maintained, with releases typically occurring a few times a year to ensure compatibility with newer Robot Framework and Python versions.

Common errors

Warnings

Install

Imports

Quickstart

Import the `DebugLibrary` in your Robot Framework `*** Settings ***`. Use the `Debug` keyword to force a breakpoint and open the interactive shell. Use `Debug If` to conditionally pause execution. Alternatively, run `rfdebug` from the command line for a standalone interactive Robot Framework shell.

*** Settings ***
Library    DebugLibrary

*** Test Cases ***
Example Debugging Test
    Log To Console    Starting test execution...
    Debug    # Execution pauses here, interactive shell opens
    Log To Console    Resuming test after breakpoint.
    ${sum} =    Evaluate    ${1} + ${2}
    Log To Console    The sum is: ${sum}
    Debug If    ${sum} > 10    # Pauses if condition is true
    Log To Console    Test finished.

view raw JSON →