{"id":9281,"library":"robotframework-debuglibrary","title":"RobotFramework DebugLibrary","description":"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.","status":"active","version":"2.5.0","language":"en","source_language":"en","source_url":"https://github.com/xyb/robotframework-debuglibrary/","tags":["robotframework","debug","debugger","repl","interactive shell","testing","automation"],"install":[{"cmd":"pip install robotframework-debuglibrary","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core dependency for Robot Framework test execution. Version 2.5.0 supports Robot Framework 7.0; version 2.4.0 supports >=4.0.","package":"robotframework","optional":false},{"reason":"Provides the interactive shell functionality and command-line interface. Version 2.4.0 upgraded to prompt-toolkit >=3.x.","package":"prompt-toolkit","optional":false}],"imports":[{"note":"Robot Framework library imports are case-sensitive. 'DebugLibrary' must be used with correct capitalization.","wrong":"Library    debuglibrary","symbol":"DebugLibrary","correct":"*** Settings ***\nLibrary    DebugLibrary"}],"quickstart":{"code":"*** Settings ***\nLibrary    DebugLibrary\n\n*** Test Cases ***\nExample Debugging Test\n    Log To Console    Starting test execution...\n    Debug    # Execution pauses here, interactive shell opens\n    Log To Console    Resuming test after breakpoint.\n    ${sum} =    Evaluate    ${1} + ${2}\n    Log To Console    The sum is: ${sum}\n    Debug If    ${sum} > 10    # Pauses if condition is true\n    Log To Console    Test finished.","lang":"robotframework","description":"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."},"warnings":[{"fix":"Upgrade to a supported Python version (Python 3.8+ for v2.5.0, Python 3.9+ for newer versions).","message":"Python 3.7 support was dropped in v2.5.0. Earlier versions (v2.4.0) dropped Python 3.6 support, and v2.3.0 dropped Python 3.5 support. Version 2.0.0 dropped Python 2.x and 3.4 support.","severity":"breaking","affected_versions":">=2.5.0"},{"fix":"Ensure `robotframework-debuglibrary` version matches your Robot Framework version. Upgrade to `robotframework-debuglibrary` 2.5.0 for Robot Framework 7.0 compatibility. For Robot Framework 5.0+, ensure at least `robotframework-debuglibrary` 2.3.0 or newer is used.","message":"Robot Framework 7.0 support was added in v2.5.0. Prior to v2.4.0, Robot Framework <4.0 was supported. Changes related to `exc.full_message` (removed in RF 5.0) were addressed in v2.3.0.","severity":"breaking","affected_versions":"<2.5.0 when using RF 7.0; <2.4.0 when using RF >=4.0"},{"fix":"Upgrade `robotframework-debuglibrary` to 2.4.0 or newer to ensure compatibility with `prompt-toolkit` 3.x. Ensure `prompt-toolkit` is updated if issues arise after library upgrade.","message":"The `prompt-toolkit` dependency was upgraded to version 3.x in `robotframework-debuglibrary` v2.4.0, which might introduce incompatibilities with older Python versions or `prompt-toolkit` versions. Explicitly declared `prompt-toolkit >=2` in v2.2.1, and 2.x in v2.0.0.","severity":"breaking","affected_versions":"<2.4.0 when using prompt-toolkit 3.x; <2.0.0 when using prompt-toolkit 2.x"},{"fix":"When using `robotframework-debuglibrary` v2.2.0 or newer, use `ls` to list libraries within the interactive shell instead of `l`.","message":"The short name for listing available libraries was changed from `l` to `ls` in v2.2.0 to avoid conflict with the new `list` command for step debugging.","severity":"gotcha","affected_versions":"<2.2.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Change the import statement in your Robot Framework file from `Library    debuglibrary` to `Library    DebugLibrary`.","cause":"Robot Framework library imports are case-sensitive. The library name 'DebugLibrary' was not capitalized correctly.","error":"ImportError: No module named debuglibrary"},{"fix":"Ensure `prompt-toolkit` is correctly installed. While `prompt-toolkit` generally handles cross-platform terminal interactions, if issues persist on older Windows Python environments, try `pip install pyreadline`. Also, ensure that standard input (stdin) is not being redirected in your test execution environment.","cause":"This can sometimes occur on Windows due to terminal input handling or missing dependencies like `pyreadline` in older environments, or general environment issues preventing the interactive shell from spawning correctly.","error":"Interactive console does not appear when calling Debug keyword (on Windows)"},{"fix":"Provide a valid Robot Framework condition as an argument to 'Debug If', e.g., `Debug If    ${STATUS} == 'FAIL'`.","cause":"The 'Debug If' keyword requires a condition to evaluate as an argument.","error":"Keyword 'Debug If' expected 1 to 2 arguments, got 0."}]}