A VS Code extension for running and debugging Robot Framework tests directly from .robot files.
✨ Features
- Adds
Run TestandDebug TestCodeLens actions above each Robot test case - Lets you configure the Python executable used to run Robot Framework
- Runs individual tests with
python -m robot --test <name> <file> - Starts a custom Robot debug session and also attaches to Python code used by the test
✅ Requirements
Before using the extension, make sure you have:
- VS Code
1.113.0or newer - The Python extension installed:
ms-python.python - A Python environment with:
robotframeworkdebugpy
Example:
pip install robotframework debugpy
🚀 Getting started
- Press
F5to launch the Extension Development Host. - Open a
.robotfile. - Run
Robot Framework: Set Python Pathfrom the Command Palette. - Pick the Python executable that should run your tests.
- Use
Run TestorDebug Testabove any test case.
🧭 Commands
Robot Framework: Set Python PathRobot Framework: Run TestRobot Framework: Debug Test
⚙️ Settings
| Setting | Description |
|---|---|
rfw-plugin.pythonPath |
Python executable used to run and debug Robot Framework tests |
rfw-plugin.enableCodeLens |
Enables or disables the per-test Run Test / Debug Test actions |
🐞 Debugging behavior
- Breakpoints in
.robotfiles are handled by the extension's custom debug adapter. - Python breakpoints are attached through
debugpyduring the same debug flow. - If no Python path is configured, the extension prompts for one.
Note: this is a lightweight custom debugger implementation intended for Robot test workflows in this repo. Advanced Robot debugging features may still need future refinement.
🛠️ Development
Use the following commands from the extension folder:
npm run compile— build the extensionnpm run watch— rebuild on changesnpm run lint— run ESLintnpm test— run extension tests
To create a package locally:
npx @vscode/vsce package