Robot Companion — native backend preview
This prerelease adds an independent Robot Framework backend for keyword navigation, language features, Test Explorer and mixed Robot/Python debugging. Native services are the default in this preview; RobotCode and the Python/debugpy VS Code extensions are not required. The regular release channel stays available. Setup: install the extension and select your project's Python. The extension carries its Python backend. Open the project, choose the project's existing Python interpreter (Python 3.11 + Robot Framework 7.3.2 or Python 3.13 + Robot Framework 7.5) and, when Robot Companion reports that its backend is missing or another build, choose Install Backend or Update Backend and confirm. See backend setup and updates. No wheel download, terminal command or second environment is needed; Robot Framework, RobotCode and your project's libraries stay as they are. The manual Windows setup guide remains an advanced, offline alternative. Choose the project's Python interpreter once per workspace folder with Robot
Companion: Select Robot Environment (or the Robot: … status item). That one
interpreter then runs the native language, discovery and debug services
( Experimental: complete Windows native debug/discovery/UI qualification is pending. The release includes scoped Linux runtime and macOS editor validation. See the release notes for the tested scope and remaining limits. A non-invasive VS Code extension for Robot Framework that answers two questions you otherwise have to answer by reading Python source:
It adds a sidebar with a rendered Documentation Preview and a Robot Return Explorer, a Robot Keywords view in the Explorer (native backend), plus hover intelligence for variable values, enum arguments, and keyword return structures. In optional coexistence mode it stays additive and starts no language server, so it coexists with RobotCode and similar extensions. WhyIn a larger Robot Framework suite, the interesting information tends to live somewhere else
than the line you are looking at. A keyword call returns an object whose fields are declared
in a Python dataclass three imports away; an argument accepts an enum defined in another
module; a test case's intent is documented in a Robot Companion surfaces that context next to the code instead of making you navigate to it. FeaturesDocumentation Preview
Robot Return Explorer
Hover intelligence
Running tests
The locating progress ends before Run or Debug starts. Informational ignored settings,
including RobotCode tool sections in During a test debug session, use Call Stack to navigate between the active keyword and its callers. Variables shows the live Robot scope for the active frame. Selecting a caller lets you inspect its source. Select the top Robot frame again to evaluate a keyword. Debug Console shows where Robot paused and why, with a link to the source line. It also shows ordinary Robot INFO messages allowed by the run's log level, alongside standard output and warnings. Robot Framework 7.3 can show an INFO message twice when it is also explicitly sent to the console. For the complete log and detailed results, use Testing → Open Robot Log after the run. Adapter capabilities and environment details are in Output → Robot Companion Debug. FoldingOptional documentation-aware folding for Robot files, where documentation markers act as section boundaries. It can be enabled as the default folding provider for Robot files, with commands to fold to headlines or to steps. Umlaut-aware Python keywordsIf your Python keywords use a decorator that converts ASCII argument names to umlaut
spellings ( Requirements
The extension has no runtime npm dependencies. Experimental owned language serviceSelecting This preview defaults to
Replace the example paths and arguments with a real LSP adapter's explicit launch
descriptor. Owned hover, completion, references, rename and symbolsIn owned mode Robot Companion registers one VS Code provider for each of these server
capabilities, and only when the server advertises it in its
A capability the server does not advertise registers nothing, so VS Code offers nothing for it from this server. Coexistence mode registers none of these providers, and in Restricted Mode no backend process starts. One hover, documentation once. Robot Companion's own hover sections (the
Documentation Preview of the Completions are not repeated. Robot Companion's typed-variable and enum completions for a named argument stay as they are; a server suggestion with the same label or inserted text is left out. Named arguments. With the native backend, type an argument name or press
Ctrl+Space in an argument cell to choose Completion diagnostics. To investigate a missing suggestion list, run Robot Companion: Toggle Completion Diagnostics (2 Minutes), return to the editor and type the prefix once. The Robot Companion Language output records provider entry, native request/reply and provider return using sequence numbers, counts, elapsed time, cancellation and document-version checks. These trace lines contain no document paths, source text or suggestion labels. They stop after two minutes, 128 completion attempts or 512 lines; running the command again stops them immediately. Tracing starts off and changes no suggestion settings or completion behavior. The channel's other existing messages retain their normal content. Rename applies the server's edit to every file it names, like any VS Code
refactoring: with VS Code's default References and symbols list only file locations the server returns; malformed ranges are dropped with a message in the Robot Companion Language output. Robot Companion keeps its own folding, CodeLenses and Documentation Preview outline; the server's folding ranges are not used. Native library and Run Keyword resolutionThe native backend reads class libraries, hybrid and dynamic libraries and the keyword
names passed to Rename a Python library keywordWith the native backend, Rename Symbol (F2) renames a Python library keyword whose name
is written in its decorator, Rename changes nothing and tells you why when it could not keep everything working:
The refusal appears at the cursor when F2 starts, before you type a name, except for checks of the new name itself, which VS Code shows as a notification. Robot Framework standard library keywords and keywords with embedded arguments are not renamed. Robot Keywords view and keyword searchThe Robot Keywords view in VS Code's Explorer sidebar (collapsed until you expand it;
the Robot Companion sidebar keeps its two views) lists the keywords the last active
Each keyword shows its arguments; its tooltip is its hover text: signature, return type
and the documentation of the definition Robot Framework runs (for a class library, the
overriding method). Clicking a keyword, or Enter on it, opens its definition. Insert
Keyword Call (the row's inline button, or its context menu: Shift+F10 then Enter)
inserts a call at the cursor of that Robot file: on an empty line with the body's
indentation, at the end of a line on a new line below it, otherwise at the cursor. The
call is written so that it resolves to that keyword: Search Keywords in Scope is available in the Robot editor’s context menu, the view’s search button and the Command Palette. Start typing a keyword, alias, library or resource as soon as the picker opens. It shows progress if the list is loading. Press Enter to open an available definition or use the insert button to insert a call. The view follows unsaved edits of the file's imports and of the libraries and resources it reads, and the Refresh Keywords button asks again. The view needs owned mode with the native backend (the default). With RobotCode, in coexistence mode, in Restricted Mode or when the backend is not running, it shows why instead of a list. Verified on Linux (VS Code 1.141, 1280x900, actual pointer and keyboard input) with both Python/Robot Framework rows; not yet on Windows. Owned code actions and formattingIn owned mode Robot Companion also registers these providers, each only when the server advertises the capability:
Diagnostics show the server's code in the Problems view, for example Robot Companion(unknown-keyword). When you open the quick fixes for a diagnostic, the server receives that diagnostic as it published it. A code action's edit follows the same rules as rename: only text edits inside the workspace folder, none computed for an older version of an open file. A command in an action runs only when Robot Companion knows it (see RobotCode below); an action that would only run an unknown command is not offered. Coexistence mode registers none of these providers, and in Restricted Mode no backend process starts. Robot Companion has no code actions or formatting of its own, so each action appears once. Native backend 0.1.0.dev22 advertises
Install Backend adds the backend without this optional formatter. To get Format Document,
add Robocop 9.1.0 to the project environment yourself (the backend's RobotCode 2.7.0 advertises
RobotCode follows each edit with a command of its VS Code extension that shows the edited file and selects a range (the placeholder step, the new variable name). The bridge turns that into Robot Companion's own selection; other RobotCode extension commands are not run. Format on save works through VS Code's Owned semantic highlightingDark+ and Dark Modern use Robot Companion's default Robot palette: pale yellow keyword
calls ( The native semantic provider keeps variable names and their declaration/resolution
information. The editor presentation leaves variable delimiters and Robot's In owned mode Robot Companion registers semantic token providers when the server
advertises
With a Native backend 0.1.0.dev22 offers RobotCode 2.7.0 offers
The same Without a provider (coexistence mode, Restricted Mode, an owned folder without a
language backend, or a server without Checked live with both providers in VS Code 1.141.0 at 1280x900 with actual pointer and
keyboard input: a click on the token, then Developer: Inspect Editor Tokens and
Scopes from the Command Palette shows the token's text and its semantic token type for
Owned inlay hintsIn owned mode Robot Companion registers one inlay hint provider when the server advertises
Native backend 0.1.0.dev22 shows two kinds of hints for a keyword call that resolves, through the file's imports, to exactly one keyword whose signature it reads statically (the same resolution as Go to Definition):
Hovering a hint names its keyword and where it comes from, for example Argument name of
Build Record · Library Audit · AuditLibrary.py. An ambiguous call (two imported libraries
define it), an unresolved or embedded-argument call ( RobotCode 2.7.0 shows its own hints: argument names ( Three settings, per folder, switch them; changes apply at once without a restart:
A hint without a kind (RobotCode's library prefix) follows only Checked live in VS Code 1.141.0 at 1280x900 with actual pointer and keyboard input on the
native backend's synthetic corpus ( Choosing the provider: native backend or RobotCodeTwo providers can serve owned mode.
The VSIX includes the matching The independently buildable source remains in
With this configuration nothing of RobotCode is involved: Test Explorer lists the tests the
native discovery service finds, Run starts the native venv's own A complete RobotCode folder configuration (a Python environment with
For a mixed combination, take one descriptor from each example. Changing either setting stops that side's old processes before the new provider starts; the other side keeps running untouched, and providers, CodeLenses and the test controller are never doubled. Which provider is active. With a Robot file open, the Refusals. Before anything starts, Robot Companion refuses a descriptor whose
Native debugging. The native debug adapter runs the test in its own Robot worker
and, unless the launch configuration sets Native breakpoint editing, Pause and Step Out. Robot breakpoints can be added and
removed in the gutter (or with F9) while the session runs. While Robot is paused the
change takes effect before you continue: Continue (F5) stops at an added line and not
at a removed one. While Robot is running, the backend answers that the breakpoint is not yet verified
(Applies when the running Robot test reaches its next keyword; VS Code 1.141 still draws
a normal breakpoint glyph) until the test starts its next keyword; then it is verified
and can stop there. Pause (the toolbar button or
F6) stops the running test before its next keyword, showing that keyword's line, the
call stack and variables. A library keyword that is blocking — a long A breakpoint on a setting line
that calls a keyword stops at that call each time it runs: Native restart. The debug toolbar's Restart (Ctrl+Shift+F5) restarts a native
session in place, whether Robot or Python is paused or the test is running; restarting from
the Python: child restarts its Robot session. The same Robot session continues: the
backend stops the old Robot worker, its debugpy adapter and the Python child, then starts
new ones with the same target, folder, Robot arguments and Python setting. Robot
breakpoints keep their identity and are verified again. Python breakpoints go to the new
Python: child, which replaces the old one under the same Robot session. Variables and
frames of the earlier run become invalid; asking for one gives Stale Robot handle from an
earlier run of this session. Each restarted launch writes its results to a new folder, so
the earlier run's Attaching to a prepared run (native backend). Robot Companion attaches only to a Robot run that the native backend started and owns for this purpose. It cannot attach to an arbitrary process ID or network address. Prepare the run in a terminal with the project environment's backend, inside a trusted workspace folder that uses the native execution backend in owned mode:
Within 30 seconds (
Breakpoints, the Debug Console, the Python: child and Restart then work as for a
launch. A restarted prepared run writes its results to a new folder below the prepared run's
output folder ( Hit counts, Robot failure stops and changing values (native). These use VS Code's own controls; nothing extra is installed.
Test Explorer discovery per combination. Both providers have a discovery service: the
native backend's
Previously verified combinations (published 1.3.5 baseline: Linux arm64, VS Code
1.141.0, Python 3.13.7, Robot Framework 7.5, debugpy 1.8.22, RobotCode 2.7.0, native
backend 0.1.0.dev4 built offline; the RobotCode, Python and debugpy VS Code extensions absent): each of the four
combinations starts and shows its providers; F12/Peek/Ctrl-click, the Return Explorer
link, hover, completion, signature help, references, rename and symbols with each language
provider; the full audit debug journey (Robot console keyword, Python child at
AuditLibrary.py 18, step, Remaining qualification: representative large projects, complete Windows editor interaction and actual remote/WSL/container servers. Coverage, continuous runs, directory/tag/profile Test Explorer selection and Markdown/TOML support are implemented; their full authoring and platform interaction matrices remain open. The accepted Linux interaction checks cover the synthetic audit corpus; consult this release's validation artifact for the exact integrated-source results. RobotCode-only capabilities such as document highlights, implementation, folding/selection ranges and inline values are not exposed by Companion. Reverse/data/function breakpoints and interrupting a blocking library call with Pause remain unsupported. Project Robot configuration (
|
| Option | Applied as Robot applies it |
|---|---|
--pythonpath / -P |
Module-name imports (Library mylib, Library pkg.module, Variables myvars) are searched in these directories in order, then in the workspace folder. A module next to the suite is not found unless one of these lists its folder, as in Robot. Relative Resource, library and variable file paths are tried next to the importing file first, then in the same directories. Installed packages (site-packages) are not searched: such a library shows Library not resolved in this version (information) and hides no other diagnostic. |
--variablefile / -V |
Python, JSON and YAML variable files (file.py:arg too). Their variables override the suite's own, like --variable, in the order given. |
--variable / -v |
NAME:value (and Robot 7.3's NAME: int:42) override every suite and imported variable. Hover says Command-line variable; F12 has no source location to open. |
--argumentfile / -A |
Read as Robot reads it, relative to the workspace folder. STDIN is refused for language and discovery. |
--extension / -F |
Test Explorer lists the suite files Robot runs for a directory with these extensions (robot:robot.md); without it, Robot's default (Robot Framework 7.5 includes .robot.md). |
Other options (--include, --loglevel, ...) do not change language results. The
Robot Companion Language output names the applied python path, variable files and
variables, and each problem (an unknown option, a variable file that is missing or cannot
be read completely); a problem never stops the language service. Changing the setting
restarts the folder's language and discovery services. Test names use the configured
variables, so Check ${ENV} with --variable ENV:staging is listed as Check staging,
which is also the name Robot reports for the run.
Nothing is run to read the configuration. The language and discovery services never
import a library, a --pythonpath module or a variable file: Python files are read from
their source, JSON and YAML as data (YAML only when PyYAML is installed in the backend
environment). A variable file whose variables are computed (get_variables, a class named
like the module, from x import *, import-time globals()/setattr) or that cannot be
read shows an information diagnostic on its Variables import; its variables are then
unknown, so no undefined-variable warning is shown for that file, while keyword checks
continue. Run and Debug execute them, as Robot does. robotArguments is a restricted
setting: in Restricted Mode a workspace's value is ignored and no backend process starts.
Imports with variables. ${CURDIR} is the importing file's folder, as Robot replaces it
when parsing. Other variables in import names are resolved before the run from, in Robot's
order, --variable, --variablefile, the file's own *** Variables *** section (also a
value built from ${CURDIR}), variables of resources and variable files imported earlier,
and the built-ins (${EXECDIR} is the workspace folder). An import whose name needs a value
known only when Robot runs (%{ENV_VAR}, a variable a keyword sets, inline Python) shows
Import not resolved before the run (information) instead of an error.
Library names. Robot keeps the first library imported under a name and ignores later
imports with that name (Robot 7.5 warns, 7.3.2 logs it at INFO level). The native backend
does the same: Library B.py AS A after Library A.py AS A gets a
diagnostic (warning on Robot 7.5, information on 7.3.2) and its keywords are not indexed.
One library imported under two names is two libraries, so an unqualified call of its
keyword is ambiguous (Multiple keywords with name ...) and First.Keyword /
Second.Keyword each resolve; F12 opens the one definition.
Scoped variables. A variable that a test or keyword sets with VAR ... scope=TEST,
TASK, SUITE, SUITES or GLOBAL, or with Set Test/Task/Suite/Global Variable and
a literal name, counts as defined everywhere for diagnostics. When nothing else defines a
use, F12 and hover go to the step in the suite or its resources that sets it (Suite
variable set with VAR scope=SUITE in test First). Rename refuses such variables, and
variables from the command line or a variable file, instead of changing only some uses.
Branch-sensitive variable diagnostics. A test's or keyword's own variable is defined
only after a step that may assign it. A use before its first assignment (also in the same
step, as in ${x}= Set Variable ${x}, or in an inline IF that assigns it), or a use
whose only assignment is in another branch of the same IF/ELSE IF/ELSE block or in
another EXCEPT/ELSE branch of the same TRY, is a warning (Variable '${x}' is not
defined here: it is first assigned on line 7., ... only assigned in another IF/TRY branch
(line 10).). Inside a FOR/WHILE body that assigns it, a use is reached on a later
iteration and is not reported.
Named unsupported cases. These are known gaps; no diagnostic is better than a false one:
- Possibly undefined after a branch. A use after an
IFwithoutELSE(or after a loop that may run zero times, or after aTRYbody that may fail) whose assignment may not have run is not reported, although Robot fails there on that path. - Installed packages and other
sys.pathentries. Only--pythonpathand the workspace folder are searched; the plainrobotlauncher does not put the workspace folder on the module path (python -m robotand the native debugger do), so prefer--pythonpath .when you rely on it. - Dynamic variable sources.
get_variables, class-based variable files, YAML without PyYAML in the backend environment,Import Variables,%{ENV}and inline Python (${{ }}) values are unknown before the run. - Class and dynamic libraries stay as before: their keywords are not indexed.
- Breakpoint conditions and logpoint expressions are Robot expressions (Python) evaluated
in the paused worker. An expression that calls
sys.exit()orexit()is reported in the Debug Console (Breakpoint 3 condition error at x.robot:7: SystemExit: 3; not stopping, or<error: SystemExit: 4>in a logpoint) and the run continues; as anIFcondition in your test, the same call still stops the whole Robot run. Process-ending calls that are no exception (os._exit()) and expressions that never return are not guarded. - The RobotCode providers read their own configuration (
robot.toml); with RobotCode,robotArgumentsapply to Run and Debug only, and the output says so. RobotCode 2.7.0 reads no Markdown Robot sources.
robot.toml settings
Robot Framework reads no TOML file; RobotCode's robot.toml format is the common place for
project settings. With the native backend, Robot Companion reads it from the workspace
folder, in RobotCode's order: pyproject.toml (its [tool.robot] table), robot.toml,
then .robot.toml. A later file's setting replaces an earlier one; an extend- setting
adds to it. These settings are applied:
| Setting | Robot option | Example |
|---|---|---|
python-path, extend-python-path |
--pythonpath |
python-path = ["lib", "resources"] |
variables, extend-variables |
--variable (string values) |
[variables] / ENV = "staging" |
variable-files, extend-variable-files |
--variablefile |
variable-files = ["config/env.py"] |
extensions |
--extension |
extensions = "robot:robot.md" |
args, extend-args |
any Robot arguments as given | args = ["--loglevel", "DEBUG"] |
They become Robot arguments placed before robotCompanion.robotArguments, so
robotArguments wins where Robot keeps the last value (a --variable of the same name). The native
language service and Test Explorer discovery apply them as described for robotArguments
above; Run Test, Run Suite, Test Explorer Run and Debug Test pass them to
Robot. Relative paths are relative to the workspace folder. F12 on a robot.toml variable
opens its line in robot.toml, and hover names it (Command-line variable · robot.toml
[variables], line 6). The run transcript, the Debug Console and the Robot Companion
Language output name the files applied.
Validation and help. Open a robot.toml file: Problems shows, at their line, TOML syntax
errors, wrong value types (errors; the setting is not applied), RobotCode settings Robot
Companion does not apply (output-dir, listeners, profiles, { expr = ... } values,
...; warnings) and unknown keys. Hovering a setting shows what it does and the Robot option
it becomes. The JSON schema schemas/robot-toml.schema.json is contributed through
tomlValidation for TOML extensions that read it (for example Even Better TOML); Robot
Companion itself needs no TOML extension.
Edits apply when the file is saved (the language service restarts; Test Explorer reads it
again). Nothing in robot.toml is run, and it is read only in a trusted workspace with the
native backend. Not applied: profiles and default-profiles, RobotCode expressions, the
user-level default configuration, and in coexistence mode or with only RobotCode providers
(Run Test then says robot.toml settings ... not applied and why).
Markdown Robot sources
Robot Framework 7.5 reads Robot data from Markdown: only fenced code blocks marked robot or
robotframework count, and each block is dedented. A .robot.md file is a suite (in
Robot's default --extension); a .md or .markdown file is a resource when a Robot file
imports it, and a suite with --extension md.
# Login checks
```robot
*** Settings ***
Resource keywords.md
*** Test Cases ***
Valid Login
Open Login Page
```
With the native backend and Robot Framework 7.5, Markdown editors get the same definitions
(F12, Ctrl/Cmd+click), hover, completion, references, rename, symbols,
diagnostics and semantic highlighting in their Robot blocks, at the file's own lines and
columns, also for a block indented in a list item. Prose and other code blocks get none.
Test Explorer lists .robot.md suites at their test lines, Run and Debug Test run them, and
breakpoints set in the glyph margin of a .robot.md suite or a Markdown resource stop the
debugger at that line; stack frames use the Markdown lines (Robot numbers only the lines of
its blocks). A .md file other than a .robot.md suite is served only when a Robot file
imports it with Resource, found as Robot finds it: next to the importing file, then on the
python path (--pythonpath, robot.toml's python-path), with ${CURDIR} and command-line
variables replaced. Another file with the same name is never served, so a root README with an
example block gets no diagnostics when docs/README.md is imported. Markdown files get no
quick fixes or formatting.
Robot Framework 7.3.2 reads no Markdown. With it, a .robot.md file shows one warning
(Robot Framework 7.3.2 does not read Markdown files ...), Test Explorer shows it as a
not discovered error item, Resource keywords.md shows Robot's own error
(Invalid resource file extension '.md'), and a breakpoint in a Markdown file stays
unverified with the message Robot Framework 7.3.2 does not read Markdown files, so this
line never runs: Robot 7.3.2 ignores such a suite and fails such an import. Nothing is
treated as Robot Framework 7.5 would.
Pinned RobotCode 2.7.0 language bridge
Robot Companion can run the RobotCode 2.7.0 Python language server as its owned
backend; the RobotCode VS Code extension is not needed and should be disabled. Prepare
a Python environment with robotframework and robotcode[all]==2.7.0 yourself, then
point the descriptor at that environment's interpreter:
"robotCompanion.languageBackend": {
"id": "robotcode",
"version": "2.7.0",
"contractVersion": 1,
"workspaceUri": "file:///absolute/workspace",
"cwd": "/absolute/workspace",
"env": {},
"services": {
"language": {
"executable": "/absolute/venv/bin/python",
"argv": ["-m", "robotcode.cli", "language-server", "--stdio"],
"transport": "stdio"
}
}
}
A descriptor with "id": "robotcode" is pinned. It must declare version 2.7.0, and
the server must report itself as RobotCode Language Server 2.7.0 when it starts.
Otherwise the language service stops, registers no providers and names both versions in
the Robot Companion Language output channel. Robot Companion answers RobotCode's
configuration requests from your robotcode.* settings, if any, but always starts
RobotCode's documentation web server on demand only, so the bridge opens no listening
port. RobotCode keeps its analysis cache in a .robotcode_cache folder in the
workspace, as it does with its own extension. F12, Peek, Ctrl/Cmd-click and the
Return Explorer's definition link then use RobotCode's import-aware resolution: in
the audit corpus, Build Record opens the imported AuditLibrary.py line 12 even
though an unimported AShadow.py defines the same keyword. Go to References on
Build Record lists its call sites in audit.robot and alias.robot and its
definition in AuditLibrary.py, never AShadow.py. RobotCode 2.7.0 advertises hover,
completion, signature help, references, rename and symbols once the client declares
support for them, which Robot Companion does; with this bridge all of them are on.
Experimental owned debug type
Owned mode also provides a Robot Companion debug type (robotcompanion). It is
selected separately from the language service through robotCompanion.executionBackend,
a contract-v1 descriptor whose services.debug entry names the debug adapter's
executable and argv (stdio, no shell). Add a launch configuration such as
{ "type": "robotcompanion", "request": "launch", "name": "Robot Companion: Debug current file", "target": "${file}" },
or press Run and Debug with a .robot file open. Robot Companion starts one owned
adapter process per session on the workspace host. The capabilities it negotiates
are written to the Robot Companion Debug output channel. Capabilities the debug
journey needs but the backend does not advertise (terminate, setting variables,
hover evaluation) are named in the Debug Console instead of being emulated. Stopping
the session sends disconnect; the process then gets one second to exit before it is
terminated, then killed. Changing the mode or the execution descriptor stops a running
session. Coexistence mode, Restricted Mode, a missing descriptor or a backend without a
debug service start nothing and say why. No debug backend ships with the extension.
To debug with the pinned RobotCode 2.7.0 Python packages, give executionBackend the
same "id": "robotcode" / "version": "2.7.0" header as the language bridge. This is a
complete owned-mode folder configuration with RobotCode debugging and Test Explorer
discovery (leave out discovery for debugging only; robotCommand is what Run Test
and Test Explorer's Run start):
{
"robotCompanion.integrationMode": "owned",
"robotCompanion.robotCommand": "/absolute/venv/bin/robot",
"robotCompanion.executionBackend": {
"id": "robotcode",
"version": "2.7.0",
"contractVersion": 1,
"workspaceUri": "file:///absolute/workspace",
"cwd": "/absolute/workspace",
"env": {},
"services": {
"debug": {
"executable": "/absolute/venv/bin/python",
"argv": ["-m", "robotcode.cli", "debug-launch", "--stdio"],
"transport": "stdio"
},
"discovery": {
"executable": "/absolute/venv/bin/python",
"argv": ["-m", "robotcode.cli", "--format", "json", "--no-color", "--no-pager", "discover", "tests"],
"transport": "stdio"
}
}
}
}
The languageBackend descriptor above is separate and can be added alongside. The
environment needs debugpy for Python debugging. Robot Companion then:
- runs the test with that environment's Robot Framework in the folder, adding
robotCompanion.robotArguments(robotCommandkeeps applying to Run Test), and writes each debug run's results to its own folder in the extension's workspace storage; - stops on Robot breakpoints with stack, scopes and variables. The Debug Console
runs a Robot keyword in the paused test, for example
Catenate SEPARATOR=- ${SUITE_VALUE} console. You can also select a keyword call together with its...argument continuation lines in the editor and choose Evaluate in Debug Console from the context menu; - when Robot code calls into Python, opens a Python: child session under the Robot session. It stops on Python breakpoints, steps, and evaluates Python locals in the Debug Console. While Python is paused, Call Stack shows the Robot session (running) with the Python session under it. Select a Robot frame in Call Stack to send console input to Robot again;
- shows Robot's console output and the test's
Logmessages, each with its source line, in the Debug Console. Add"outputLog": falseto the launch configuration to leaveLogmessages out; - on stop, ends the Robot run, the Python debugger and every other process the session started.
Python breakpoints are available without the Python extension. RobotCode-specific messages stay inside Robot Companion's adapter, including the line in which RobotCode reports the debugpy port it picked. debugpy's own warning that frozen modules may make the debugger miss breakpoints still opens the Debug Console on Python 3.13. It names the interpreter option and environment variable that silence it; Robot Companion does not change your environment to hide it.
In coexistence mode, VS Code still lists Robot Companion among Run and Debug's
debuggers, and picks it without asking when a .robot file is open and no other Robot
debugger is installed. Choosing it starts nothing and shows why: Robot Companion
debugging runs only in owned mode, so keep using your existing Robot debugger.
Experimental owned Test Explorer discovery
When the folder's robotCompanion.executionBackend also has a services.discovery
entry (or, when it has none, robotCompanion.discoveryBackend does; see
Test Explorer discovery per combination),
Robot Companion starts that process and asks it for tests with the
integration's normalized discovery API (robotCompanion/discoverTests, version 1; the
backend must advertise robotCompanionDiscovery.version 1 when it initializes). Suites
and tests appear in Test Explorer under Robot Companion, one suite per .robot file
with its tests and tasks below it, labelled as the backend names them. With the native
backend, each folder that holds suites is a directory suite row with Robot's suite name
(an __init__.robot Name setting, else the folder name as Robot writes it, for example
api tests as Api Tests), and its file suites and subfolders are below it; the RobotCode
bridge lists file suites only. Each test carries its Robot tags as Test Explorer tags:
the tags Robot Framework gives it from the folders' and the file's Test Tags,
Default Tags, its own [Tags] and -tag removals. Type @robotCompanion:smoke in the
Testing view's filter to see only tests tagged smoke (the filter suggests the tags).
Test IDs are built from the file URI and the test name (plus #2, #3 … for a repeated
name in one file), so they stay stable across backends and restarts. A click on a test opens
its source at the test's name line. Saving a .robot file rediscovers; after files are
added, renamed or deleted outside the editor, Refresh Tests (the Testing view's
refresh button) starts the discovery service again and shows the new tree without a
window reload.
Discovery never shows a partial tree silently:
- When the backend reports files it could not read or parse completely (the native
backend's
errors, for example an unknown section header or an empty test), the tree shows what Robot Framework would run and, next to it, one error item per problem, labelled<file>: discovery error (line n)with Robot's message; the Tests status row turns into a warning with the error count. - When the discovery service cannot start, exits or crashes, answers with a JSON-RPC
error, or returns an invalid result (for example a source outside the folder), the
folder's tree is emptied (never kept stale) and replaced by one error item
<folder>: discovery unavailablewith the reason. An error notification names the setting and the folder, and the Tests status row shows refused. Refresh Tests tries again. The folder's language service and debugging keep running.
Without a discovery service, or outside owned mode, no Robot Companion test controller is registered; navigation, debugging and the CodeLens runner keep working. Running, debugging and stopping tests from Test Explorer are described below.
With the native backend, discovery works when the executionBackend (or a
discoveryBackend descriptor) has the discovery service of the
native folder configuration. The
service reads the folder with Robot Framework's own parser on every request and imports
or runs nothing; its rules (what counts as a suite, labels such as Login On staging for
Login On ${ENVIRONMENT}, and errors) are in
backend/README.md.
With the RobotCode bridge, discovery works when the executionBackend has the
discovery service shown in the owned debug example.
Robot Companion runs that command for the folder (it appends the folder path), and on each
save, and converts RobotCode's result to the normalized tree. This was checked live: RobotCode
discovery lists the audit test at its source line, a click opens it, and Run with
robotCompanion.robotCommand set to that environment's robot reports PASS from the
run's output.xml. In the same owned configuration, a click on audit.robot's Run Test
CodeLens runs the test with that robotCommand and reports it passed. Other discovery and
run checks use a local fixture and a fake robot.
Test Explorer run, debug, rerun and Stop
In owned mode with a discovery service, Test Explorer runs real Robot Framework:
Run works on one test, a multi-selection (Ctrl/Cmd-click rows, also mixing tests, file suites and directory suites), a directory, a suite or everything, and runs exactly the selected tests. Robot Companion starts Robot with the folder's
robotCompanion.robotCommandandrobotCompanion.robotArguments, in the workspace folder, without a shell, on the workspace folder itself, so every__init__.roboton a selected test's path applies as in a command-line run of the folder: suite setups and teardowns,Test Tags,Default Tags. Robot parses only the selected files (one--parseincludeeach, init files aside), and a small pre-run modifier that Robot Companion copies into the run's folder keeps only the selected tests, identified by their file and the line of their name. Test names are not used for selecting, so a name with variables (Login On ${ENVIRONMENT}), with glob characters, or repeated in a file selects exactly that test. Tests and tasks run in separate Robot runs (Robot refuses to mix them); otherwise a selection is one Robot run per workspace folder. The run's options are in an argument file in its folder (Robot's console output, with the command line, appears in Test Results).Profiles: each entry of the
robotCompanion.testProfilessetting adds a Run profile with its name, a coverage profile named<name> (Coverage)and, when Debug Test is offered, a Debug profile named<name> (Debug). Choose it with Execute Using Profile... in a row's context menu (or Run Using Profile... / Debug Using Profile... in the Testing view). A profile passes itsincludeandexcludetag patterns to Robot as--include/--excludeand itsargumentsafterrobotArguments:"robotCompanion.testProfiles": [ { "name": "Smoke", "include": ["smoke"], "exclude": ["slow"] }, { "name": "API nightly", "include": ["api AND nightly"], "arguments": ["--variable", "ENV:ci"] } ]Only the selected tests whose discovered tags the patterns select are started and shown running; the run output lists the others. Patterns follow Robot's rules (case, spaces and underscores ignored;
*,?,[...];AND,OR,NOT). Robot still decides: a test that Robot's own selection leaves out (for example because a tag uses a variable only set at run time) is shown Skipped with that reason in its output. Robot Framework 7.3.2 removes spaces before it looks forAND/OR/NOT, 7.5 does not, so a pattern such asDEMO RUN(anORonce the space is gone) is read the 7.5 way when deciding what to start; Robot's own reading decides the run. An entry without a name, with a repeated name or with a non-listinclude,excludeorargumentsis not offered and is named in the Robot Companion Tests output.robotCompanion.testProfilesis a restricted setting, read only in a trusted workspace.Each test's result comes only from its own entry in that run's
output.xml, matched by its file and name line: Passed, Failed with Robot's failure message, or Skipped. A failure message is anchored at the test's source line, so it shows in the editor next to the test, and clicking the test opens that line. Results from one run never reach another run's tests. If Robot does not report a test (for example, Robot could not start), the test is shown as errored with the reason; the exit code alone never marks a test Passed. A selected test is identified by its file, its name line and its name: if the file changed after discovery so that the test no longer starts at that line (also when another test now does), it is not run, and no other test runs or reports in its place; it is errored with that reason. Save the file or use Refresh Tests and run it again.Results and logs: each run writes Robot's
output.xml,log.htmlandreport.htmlto its own folder in the extension's workspace storage, withrobot-companion-run.json(profile, Run or Debug, command, exit, and each test's status). In Test Results, each test's output names its status and its run's log at the test (log.html#<Robot id>). A test, file or directory row's context menu has Open Robot Log (at the test) and Open Robot Report for its latest results. The newest 40 run folders are kept, and never a folder that holds a listed test's latest results.Rerun Failed Tests (on a run in Test Results, or
Ctrl+;thenE) runs only the tests that failed in the last run and updates their state.Stop (Cancel Test Run) ends the running Robot process and every process it started. On Linux and macOS: its whole process group, and the processes it started outside the group (Robot's
Start Processstarts each process in a new session), first with SIGTERM, then with SIGKILL after two seconds. On Windows:taskkill /T /Fends Robot and its whole process tree at once (a console process cannot be asked to stop), so that run writes nooutput.xmland all its tests, finished ones included, are Skipped.During Debug Test, both the Testing Stop and the debug toolbar Stop end the debug session. If the debug backend does not end the session itself (for example while Robot waits in a long keyword), Robot Companion ends the debug adapter's process group (the RobotCode launcher, Robot and the processes Robot started) about two seconds after the debug toolbar Stop, or about five seconds after the Testing Stop. The Python debugger then exits with Robot.
On Linux and macOS, tests that Robot had already finished keep their result from that run's
output.xml; every other test of the stopped run or debug session, and of runs that had not started, is marked Skipped (on Windows, every test of a stopped Run, see above). Nothing is left running, and the next Run or Debug Test starts normally.Debug Test is offered when the same
executionBackendalso has a debug service. It starts the owned Robot Companion debug type on the workspace folder with the same selection as Run (one session per folder and mode), linked to the test run, so breakpoints, stepping and the Debug Console work as described above. When the session ends, each test's result comes from that debug run's ownoutput.xml.
Test Explorer coverage
Run Test with Coverage (a row's action, Run Tests with Coverage in the Testing
view, or a <name> (Coverage) profile) runs the selection like Run and measures
which lines of the workspace folder's Python files ran. Coverage is Python line
coverage of your keyword libraries and the modules they import; there is no coverage
of .robot or .resource files and no branch coverage.
- How it is measured. Robot Companion copies a small Robot listener,
RobotCompanionCoverage.py, into the run's folder and passes it with--listener. Robot creates listeners before it imports any test library, and the listener traces Python lines with the standard library only (sys.settraceandthreading.settrace), so nothing has to be installed in your project's Python androbotCompanion.robotCommandstays as it is. A line counts as executable when Python compiles code for it and as run when Python reported it to the tracer while Robot ran; both come from the same compiled file, on Python 3.11 and 3.13 alike. A statement spread over several lines counts each line that holds code of it. The run's folder keeps the result ascoverage.jsonandrobot-companion-run.jsonrecords the totals. - What is shown. Only measured files appear in the Test Coverage view and in the
editor gutter (covered and missed lines):
.pyfiles below the workspace folder that the run imported, except anything in asite-packagesordist-packagesfolder (for example a virtual environment inside the workspace). Files the run never imported are not listed. Filter Coverage to Test shows the lines one test ran. A line counts for the test that was running when it ran, by the test's file and name line; lines run in suite setups and teardowns count for the run but for no test, and lines that a background thread ran during a test count for that test. - What is not measured, and says so. Processes that Robot or a test starts (
Start Process,Run Process,multiprocessing), threads that were already running when Robot started, and code that ran before the listener started (for example a module of your own--prerunmodifierthat a library imports again) are not measured; such a file is named in the run output as imported before Robot Companion's coverage started instead of showing wrong lines. A file that changed during the run is named as changed during the run and not shown. If another Python tracer is active (Robot started undercoverage runorpython -m trace, or a debugger that attaches during the run), the run shows no coverage at all: its output and a warning notification name the reason, and the tests' results are reported as usual. A stopped run shows no coverage. - Limits. Coverage runs are slower than Run, because every Python call is traced. There is no Debug with coverage. Test Explorer offers coverage only in a VS Code that has the test coverage API (1.88 or later); otherwise the Robot Companion Tests output says that Run with Coverage is not offered (not checked on such a version).
Checked against the synthetic coverage workspace (a keyword library with a helper
module, a thread, a separate process and a site-packages folder) on Robot Framework 7.5
with Python 3.13 and Robot Framework 7.3.2 with Python 3.11 by npm run test:integration,
with the exact executable, run and per-test lines of each file, and live in VS Code
1.141.0 at 1280x900 with actual input: the row action, the Test Coverage rows and
percentages, the gutter after a click on a file row, Filter Coverage to Test,
Execute Using Profile... → Smoke (Coverage), and a run under python -m trace that
shows the notification and no coverage. Not run on Windows yet.
Test Explorer continuous run
Continuous run is off until you turn it on: Turn on Continuous Run on a row (or
Start Continuous Run in the Testing view) watches that item for Run or one of
your robotCompanion.testProfiles Run profiles (Start Continous Run Using...).
- A save of a
.robot,.resourceor.pyfile in a discovered workspace folder starts a run once no other save has come forrobotCompanion.continuousRunDelaymilliseconds (default 1000), so a burst of saves is one run. Saves come from the editor (also auto save); changes by other programs (for examplegit checkout) do not start a run. - The run holds the watched tests that the saved files can affect, as discovered after
the save: a saved test file affects its own tests, a saved
__init__.robotthe tests below its folder, and any other saved file (a resource, a library, a variable file) every watched test. If none is affected, nothing runs; the Robot Companion Tests output says so. - A continuous run starts only once rediscovery after the save has finished and no other Test Explorer run is in progress, including another continuous run's and one you started yourself (also while that rediscovery was still running); it waits until they have ended. A run you start yourself does not wait for a continuous run. Saves during a run start exactly one more run after it.
- This waiting does not cover a folder whose discovery is being restarted, for example by Refresh Tests, adding or removing a workspace folder, or a change of the integration mode or a backend setting. Until the folder's discovery backend has started again, a save there may be ignored entirely, and a continuous run that starts in that time does not wait for the folder's discovery: it runs none of the folder's tests, or, with several workspace folders, possibly its tests as listed before the restart (when nothing runs, the Robot Companion Tests output says the save affects none of the continuous run's tests). Save again once the folder's tests are back.
- Turn off Continuous Run (or stopping it in the Testing view) stops a running continuous run like Stop (its unfinished tests show Skipped) and starts no further run; a continuous run still waiting for another run is turned off at once. Closing the window or disabling the extension ends continuous runs and their Robot processes the same way. When Robot Companion stops offering tests while a continuous run is on (for example after switching back to coexistence mode), it stops the running continuous run the same way and nothing runs any more, but VS Code may keep its Tests are being watched for changes badge until you turn continuous run off in the Testing view.
Checked live in VS Code 1.141.0 at 1280x900 with actual input (row actions, Quick Open,
typing and Ctrl+S in the editor): two saves 300 ms apart start one run after the delay;
saves during a three-second run start one run after it; a save during a manual
Run Test starts its run after that run ended; at most one Robot run is active
throughout; Turn off Continuous Run during a 60-second run ends the Robot process
group within a second and later saves start nothing; switching to coexistence mode or
disposing the Test Explorer integration (as deactivation does) during a continuous run
leaves no process. Debouncing, queueing (also behind a run started while rediscovery
after the save was still running) and stopping (also when Robot Companion stops offering
tests) are also checked by npm run test:integration.
Not run on Windows yet.
If workspace-wide discovery is unavailable, Test Explorer shows its error item. Owned native editor Run/Debug actions request focused file discovery independently; if that discovery is also unavailable, they report the cause and start no legacy substitute. F12 uses the separate language service. Standalone Run Test CodeLenses in coexistence mode and explicit Run and Debug launch configurations remain separate paths.
Checked live (Robot Framework 7.5, RobotCode 2.7.0 discovery and debug, VS Code 1.141.0, 1280x900) with actual pointer input on Test Explorer rows, their Run Test and Debug Test actions, the Test Results Rerun Failed Tests action, and the Testing Stop button during a run, plus both the Testing Stop (while Robot waits in a long keyword) and the debug toolbar Stop (while the Debug Test is paused at a breakpoint) during a Debug Test. After each Stop the process list has no Robot, RobotCode, debugpy or child process of that run left.
Checked live the same way with the native backend for language, debugging and discovery
(no RobotCode anywhere; Robot Framework 7.5 from the native venv): the Test Explorer tree
equals the tree a separate robot-companion-backend discovery request returns for the
folder (labels, ranges, nesting, a *** Tasks *** file, a test named
Grüße aus Köln 🎉 und 𝄞, two tests named Duplicate Name in one file as two rows, and
the backend's discovery errors as error items); clicking a test row opens its name line,
including the second Duplicate Name; a Ctrl-click multi-selection across a test file and a
task file runs exactly those three in two Robot runs; Rerun Failed Tests; Run on a suite
row; each Duplicate Name reports its own occurrence's result; Login On staging runs by
its written name; Stop ends the Robot process group; Debug Test stops at a gutter
breakpoint and reports PASS from its own output.xml; Stop during a Debug Test leaves no
native backend, Robot worker, debugpy or child process. Refresh Tests shows a file
added, renamed and deleted on disk, and a file with a parse error as an error item next to
its tests. A killed discovery service, one that fails to start and one that answers with
a JSON-RPC error each show the error item, the error notification (in the notification
center) and the refused status; the native language process keeps running and a native
Run and Debug launch still passes. Test names with emoji or other non-BMP characters show
as boxes in this test host's fonts; the labels themselves are exact.
Directories, tags, profiles, Open Robot Log / Report, Debug Test on a directory and Stop
of a test that started a worker process were checked live with the native backend (Robot
Framework 7.5, VS Code 1.141.0, 1280x900) with actual pointer and keyboard input: directory
rows expand by click and by the Right arrow key; @robotCompanion:regression in the filter
leaves one test; a Ctrl-click selection of a directory, a file and a test runs exactly those
six tests with the folders' suite setups once each; Execute Using Profile... → Smoke
on a directory runs only its smoke tests that are not duplicate; Debug Test on a directory
reports Passed and Failed per test; Stop ends Robot and the worker a test started with
Start Process. Directory and tag selection, profiles, tasks next to tests, paths with
spaces and brackets, changed files and Stop are also checked against real Robot Framework
7.5 (Python 3.13) and 7.3.2 (Python 3.11) by npm run test:integration; the tag patterns
are compared with Robot Framework's own for both versions. Windows: the same synthetic
cases are written to run on Windows, and taskkill is exercised with a stand-in; they
have not run on Windows yet (see Windows).
Not supported yet: test-level parallel runs, coverage of .robot files, and live
per-test progress during a run (the selected tests turn from running to their
result when that Robot run ends). The RobotCode bridge shows no directory suites. Test
Explorer items have no description (VS Code's Testing view would read it to screen
readers instead of the test name), so tags show through the filter, not next to the name.
Use Robot Companion: Show Language Service Status for process state, negotiated capabilities and errors in the Robot Companion Language output channel. For an active Robot document, it also reports effective suggestion settings, their default/User/Workspace/Folder and language-specific values, and matching extension default contributions. This diagnostic reads the settings without changing preferences. After fixing configuration or a backend failure, use Restart Language Service. Changes to the descriptor/mode restart the owned process; returning to coexistence removes owned providers and diagnostics, including when initialization or shutdown stalls. Nested workspace folders route definitions and watched-file events to their owning folder's backend. Restricted Mode starts no language processes and reads no executable descriptors. Granting trust starts the configured service; revoking trust reloads the extension host and stops its processes.
Execution is on the workspace extension host. The current integration checks cover
Linux arm64 / VS Code 1.141.0 with RobotCode's VS Code extension absent. Lifecycle,
error and routing cases use isolated local protocol fixtures. The language bridge is
also checked against the real RobotCode 2.7.0 / Robot Framework 7.5 Python packages
(Python 3.13.7): imported, resource, local and aliased keyword definitions, the
unimported-shadow case, and a clean process exit on stop. The debug bridge is checked
the same way with actual clicks and typing in VS Code (Python and debugpy extensions
absent). Breakpoints are set in the gutter at audit.robot 12/13 and AuditLibrary.py 18.
The Debug Console Robot keyword returns 'from-suite-console', the Python step and
count give 3, and the selected Robot frame runs Resource Step. The run ends 1 PASS
and no session process is left. Test Explorer discovery and runs are checked live with
RobotCode as its discovery service (see above). A synthetic saved workspace verifies nested-folder
language routing and removal on this host. Two folders with different runtimes,
the cleanup after a killed extension host and the declared minimum VS Code 1.141.0 are checked
as described in Several folders, remote hosts and supported VS Code;
a real remote server is not.
The owned editor features are checked live against RobotCode 2.7.0 with actual pointer
and keyboard input in a 1280x900 VS Code window: the hovers over Build Record and Local Step
(one hover, their documentation once), over ${record} (Companion's return hint, then
RobotCode's part), and over the #> block, whose Open full rendered preview link is
clicked open; keyword suggestions after
typing Bui, variable suggestions after ${ without duplicates, the active parameter
name: str = Ada, the Shift+F12 references peek, F2 renaming Resource Step in
audit.robot and shared.resource, the refused rename's notification, the Outline view,
and both symbol pickers. Capability gating is checked with the local protocol fixture: a
server without hover or rename gets no hover or rename provider and receives no such
request.
Owned mode is not yet full RobotCode-extension parity. It exposes native navigation, diagnostics, completion, hover, references, safe rename, symbols, code actions, document/range/on-type formatting, semantic tokens with deltas, inlay hints, Test Explorer runs/debugging, prepared attach/restart, live breakpoint controls, Robot failure stops, scalar editing, REPL, notebooks, Python line coverage and opt-in continuous runs. See the qualification gaps and coverage limits above.
Workspace trust transitions were checked with the RobotCode 2.7.0 language bridge in a
normal VS Code window with workspace trust enabled (not the test runner, which disables
trust), with actual clicks: in Restricted Mode no backend process starts; Trust in the
Workspace Trust editor starts it; Don't Trust restarts the extension host and the
owned process is gone, and none starts again. npm run test:trust repeats this check
(it needs a display, for example xvfb-run -a npm run test:trust, and the prepared
environment).
Robot notebooks and the Robot REPL
In owned mode with the native backend (the preview default), Robot Companion runs Robot
Framework keywords interactively, in a Robot notebook (.robotnb file) or in the
Robot REPL:
- New Robot Notebook opens an untitled notebook. Any
*.robotnbfile opens as a notebook, with the Robot Companion kernel already selected. The file saves the cells' text only, no outputs. - Open Robot REPL opens an interactive window next to the editor. Type a command in its input box and press Enter to run it.
Each notebook and each REPL has its own Robot session. The first cell starts one, in the folder of the notebook (for a new notebook or a REPL: the folder of the active editor, or the folder you pick):
- Selected environment. The session runs the backend's
interactiveservice with the folder's selected Robot environment, the interpreter its debug and discovery services use (see one environment for every service). The first cell's output names the interpreter, the Python and Robot Framework versions, and the working directory, which is the workspace folder. - Owned context. The session is one Robot test that Robot Framework runs inside an owned
worker process. Each cell runs as steps of that test: keyword calls with assignments,
VAR,IF,FOR,TRYand the other control structures. Libraries and resources imported withImport LibraryorImport Resource, and variables set by a cell, stay available to later cells. A cell that has*** Keywords ***,*** Variables ***or*** Settings ***sections defines them for the session; defining a keyword again replaces the earlier session definition. Test cases cannot be defined.${CURDIR}in a cell means the workspace folder. A failing step fails only its cell, and the steps after it in that cell do not run. - Robot arguments. From
robotCompanion.robotArguments, the session applies--variable,--variablefile,--pythonpath,--logleveland--language. It names the other options as ignored. No output, log or report file is written. - Output. Each cell shows, in the order it was produced, the messages its keywords log
(at INFO and above; warnings and errors are prefixed
[ WARN ]/[ ERROR ]and written as standard error), what they write to the console, standard output or standard error, the returned value of a single keyword call, and the failure message. Consecutive text of one stream forms one output block, and a change between standard output and standard error starts the next block, so nothing is hidden. Output always belongs to the cell that produced it. Robot Framework logs assignments itself, for example${count} = 42. - Variables. Show Robot Session Variables (notebook toolbar ⋯, the Command Palette, or click the Robot session status item) lists the variables set in cells first, then the session's and Robot Framework's own. Selecting one copies its value.
- Interrupt. The cell's Stop button, the notebook's Interrupt or Interrupt Robot
Session stops the running keyword. Robot's
TRY/EXCEPT,Run Keyword And Ignore Errorand retry keywords cannot catch it. The session and its variables are kept, and cells waiting to run are cancelled. A keyword blocked in native code (one long C call) does not notice an interrupt: 5 seconds later the session's worker is ended, the cell says so, and the next cell starts a new session. - Restart and stop. Restart Robot Session replaces the worker with a new one with the
same arguments: variables, imports and definitions are gone. Stop Robot Session ends the
session; the next cell starts a new one. Closing the notebook or REPL (its last editor tab), changing the folder's
Robot environment, its
robotArguments,integrationMode,executionBackendornativeBackendExecutable, and closing the window end the session. Each end stops every process the session started and removes its session directory. - Status. The Robot session status item shows the active notebook's session: not started, starting, idle, busy or ended. Its tooltip names the environment. The Robot Companion Sessions output channel records starts, ends and output that belongs to no cell.
Sessions start the folder's interpreter and run workspace libraries, as robot does. They
need a trusted workspace and owned mode: in Restricted Mode, coexistence mode, outside a
workspace folder, or with an explicit executionBackend descriptor (such as RobotCode) that has
no interactive service, a cell starts nothing and says why. Sessions of different notebooks,
REPLs and folders share no variables.
A session is separate from debugging. A paused Robot Companion debug session's Debug
Console still runs one keyword call, without an assignment, on the paused test with that
test's variables. The call can span ... continuation lines, including an indented
editor selection. Multiple calls and control-flow blocks are refused before execution;
the console neither sees nor changes any notebook or REPL session.
Install
From the Marketplace, or from a packaged build:
npm install
npm run package # produces a .vsix
code --install-extension robot-markdown-companion-<version>.vsix
Usage
- Open a Robot Framework workspace.
- Open the Robot Companion container in the activity bar.
- Put the cursor on a keyword call to populate the Return Explorer, or on a documented test case to see the rendered documentation.
Documentation color markup
Documentation comments and [Documentation] Markdown support explicit color tags in the live
preview and the PDF/Markdown export:
- Semantic tags:
<note>,<question>,<warning>,<error>,<success> - Color shortcuts:
<red>,<orange>,<yellow>,<green>,<blue>,<pink>,<purple>,<gray> - Custom colors:
<color value="red">...</color>,<color value="#0f766e">...</color>
A color tag with an unsupported color or extra attributes is rendered as plain text. Other HTML
in documentation is passed to the Markdown renderer, but the preview and the printable export
never run script from it, and a command: link in documentation only works for Robot
Companion's own commands; links to any other command do nothing. This holds in trusted and
Restricted Mode alike. The Markdown export preserves the author-facing tags.
The preview, the Return Explorer and the printable export also ignore a <style> element, a
style= attribute or a <link> stylesheet written in documentation. Each piece of documentation
is rendered as a self-contained fragment: closing tags without a matching opening tag, such as a
stray </section> or </div>, are dropped, so documentation stays inside its own area and paints
only there, including an SVG drawn larger than its box. It cannot hide, recolor or cover their
buttons and links, including the links the Return Explorer shows next to a keyword docstring, such
as Jump to keyword definition; the color tags above, the arrow-line indentation and the page
breaks of the printable export still render.
Links in documentation, hovers and the preview that open, preview, fold or export a document act
only on a file inside an open workspace folder or on the document already in view (the active editor,
or the one the Documentation Preview or Return Explorer shows). A link to any other file or URI,
including a .. path that leaves the workspace folder, opens nothing and writes a warning naming
the refused command to the Robot Companion output channel. A single .robot file opened
without a workspace folder keeps working while it is in view.
Images in documentation load from data: URIs and the webview's own resources. Remote images
(https:) load only in a trusted workspace; in Restricted Mode they stay blank.
Running tests
In a .robot file, Robot Companion adds a Run Suite CodeLens on each
*** Test Cases *** / *** Tasks *** header and a Run Test CodeLens on each test or task
name. The same actions are available as commands:
- Robot Companion: Run Test at Cursor runs the test containing the cursor (Command Palette
and the editor context menu of
.robotfiles). Outside a test it runs nothing and says Place the cursor inside a test case to run it. - Robot Companion: Run Suite runs every test in the current file (Command Palette, editor
context menu and Explorer context menu of
.robotfiles).
.resource files and .robot files without a test or task section get no run CodeLens, and
the commands say there are no tests in the file. Unsaved edits are saved before the run; a new
file that was never saved is not run until you save it.
Select an environment
Click Robot: … in the status bar of a saved .robot file, or run Robot Companion:
Select Robot Environment. The native picker shows Python/Robot versions after checking,
and distinguishes missing Robot Framework, unavailable executables, failed checks and timeouts.
The tooltip contains the full executable, folder and effective source. The item hides outside
Robot files. Use typing, arrow keys and Enter to choose; Escape cancels without changing your
choice or editor position. Enter path… first asks for a Python interpreter or a Robot
executable, then one absolute executable path, without arguments or surrounding quotes. Spaces,
Unicode and shell-looking characters are literal. Back returns to the previous step.
Choices are saved separately for each workspace folder URI and survive an extension-host/window
restart. A file in another root uses that root's choice. Standalone .robot files keep their
existing default/configured runs and status, but saving a picker choice requires an open workspace
folder. Switching the active folder during a picker/path flow cancels tentative input.
Precedence is explicit robotCompanion.robotCommand setting > saved choice > robot on PATH.
User, Workspace and Workspace Folder settings count as explicit, even when set to robot.
The picker/tooltip identifies an overriding setting and a masked saved choice; selecting an
alternative saves it for later without rewriting your settings. A broken setting remains an error.
With no explicit setting or saved choice, runs retain the previous PATH behavior.
Sources include .venv, venv and env in the current workspace root, robot on PATH, and
custom executables. A small .venv text file may point to an absolute external environment root.
This covers conventional in-project Poetry/pipenv environments; external manager locations need
Enter path… or the Python source. No dependency-manager command or recursive search runs.
Opening the picker shows it before asynchronous checks; at most two probes run at once, each
bounded to two seconds and 64 KiB output, with a twenty-second refresh deadline. A cancelled probe
still counts toward the two until its process has exited, at most two seconds. Refresh clears
short-lived availability caches (30 seconds for success, five for failures).
If the optional Microsoft Python extension exposes the public environments API with
getActiveEnvironmentPath, resolveEnvironment, and onDidChangeActiveEnvironmentPath, its
Python extension (follow) row shows the current interpreter path and follows that extension's
interpreter for the file, only after you explicitly select it. The saved choice remains a follow choice, rather than pinning the displayed executable.
Cold activation, Python readiness and environment lookup share one fifteen-second total budget; a
timeout names the phase that did not finish. If that original startup or lookup later succeeds while
the same choice is still current, one fresh bounded check can recover services that previously refused
it. The saved choice remains a follow choice. Selecting the row again after Python is ready also
retries the saved choice. Installing the Python extension
alone never changes your default. Unsupported API versions, missing local executable URIs or unavailable interpreters remain unavailable; they
never fall back to PATH. The adapter has synthetic contract/lifecycle coverage; genuine installed
Python-extension integration has not been verified in the offline baseline. In a remote window
Robot Companion runs on the remote extension host (see
Several folders, remote hosts and supported VS Code),
so an interpreter path is used on that machine as reported; no local-to-remote path translation
is involved. This has not been checked against a real remote server.
Selected Python runs as the exact interpreter plus -m robot. This binds Robot's module to
that interpreter and avoids a console script's potentially stale absolute shebang after an
environment move. It cannot repair every moved/broken venv. Explicit Robot executable choices
run that executable directly; configured commands keep their existing parsing. Neither route uses
a shell or changes project import semantics.
One environment for language, discovery, debug and runs
In owned mode a folder's selected Python interpreter (a saved choice or the Python extension row) also runs that folder's native services, so one interpreter controls everything:
| What | Runs as |
|---|---|
| Language service | <python> -m robot_companion_backend lsp |
| Test Explorer discovery | <python> -m robot_companion_backend discovery |
| Debugging (the Robot worker runs in the same interpreter) | <python> -m robot_companion_backend dap |
| Run Test, Run Suite, Test Explorer Run | <python> -m robot … |
The working directory is the workspace folder. Precedence, per service:
- An explicit
robotCompanion.languageBackend,executionBackendordiscoveryBackenddescriptor (for example the optional RobotCode fallback) is used as written. robotCompanion.nativeBackendExecutableruns that backend executable.- The selected Python interpreter, as above.
- With no interpreter selected (nothing saved,
roboton PATH or a Robot executable), the project's.venvbackend executable, as in the 1.3.0 preview. Its environment is checked against the bundled build like a selected interpreter: another build or version starts nothing and is offered Update Backend for that.venvinterpreter.
Because the language service runs in that interpreter, a Library module_name installed
there (in its site-packages, or elsewhere on its sys.path) gets hover with its documentation,
Go to Definition, completion and the unknown-keyword error for a misspelled call, read from its
source without importing it. Each folder sees only its own interpreter's libraries. A module
beside the importing file comes first; installed libraries cannot be renamed.
robotCompanion.robotCommand still overrides only runs: the language, discovery and debug
services keep the selected interpreter. An unavailable Python extension interpreter never
falls back to the .venv backend; its services stay stopped with the reason.
Before a native service starts, Robot Companion runs one short, owned check with the interpreter
(no shell, 15 seconds at most, never in Restricted Mode). It reads the Python and Robot Framework
versions and the installed robot-companion-backend version, without importing the backend or
Robot Framework, and computes a digest of the installed backend files: SHA-256 over the sorted
lines path NUL sha256(file bytes) LF of every file under robot_companion_backend/ that pip
recorded (bytecode excluded). For a backend executable (nativeBackendExecutable or the .venv
fallback) the interpreter is taken from robot-companion-backend doctor. Robot Companion: Show
Language Service Status prints one Environment line per folder, and the Language, Debug and
Tests rows name it too, for example:
[Projekt] Environment — selected python: /work/.venv/bin/python (Python 3.11.9, Robot Framework 7.3.2);
robot-companion-backend 0.1.0.dev22 (sha256 <build digest>, 32 files) at /work/.venv/lib/python3.11/site-packages/robot_companion_backend;
backend files sha256 12b9476c45fe…
The {} status rows show the Python version next to the capability count; the Robot: …
item's tooltip says which interpreter the native services use and retains the full availability
diagnostic when the status bar shows a short warning. The Debug Console prefixes its environment
line with Robot Companion environment: to distinguish it from program output. It and the
Robot Companion Language, Debug and Tests output channels repeat the line when a service
starts. If the selected interpreter cannot run the supported backend, nothing starts and one
notification per folder names the interpreter and its versions, with Select Robot Environment
and Show Status: the backend is not installed, another version or another build of the same
version is installed (its file digest differs from the build bundled with the extension), a module
in the folder shadows it, its files are incomplete, Robot Framework is missing, the Python/Robot
Framework combination is not a supported row, or the interpreter does not start. When the bundled
build fixes it, the notification offers Install Backend or Update Backend first (see
backend setup and updates). Language and debug in other folders are
not affected. With no interpreter selected and no .venv backend, the notification asks you to
select the project's Python interpreter.
Changing a folder's selection (or the Python extension's interpreter for a followed folder, or a
successful Install robotframework) restarts that folder's language and discovery services and
stops its running debug sessions; other folders keep their processes. Changing
nativeBackendExecutable or a descriptor restarts the services as before. Restart Language
Service and Refresh Tests repeat the check, for example after installing the backend.
In Restricted Mode no check, interpreter or backend starts; after Trust the saved choices apply.
Backend setup and updates
The extension contains the backend build it supports (bundled-backend/: the
robot-companion-backend 0.1.0.dev22 wheel, the debugpy 1.8.22 wheel published on PyPI and a
manifest with their SHA-256 and the digest of the installed backend files). The backend is
installed into the folder's selected project interpreter, so it reads your project's Robot
Framework and installed libraries directly; there is no separate tooling environment to maintain.
- Install the extension, open the project and a
.robotfile. If no interpreter is selected yet, a notification asks for it: choose Select Robot Environment and pick the project's Python. - If that interpreter has no backend, another version, another build of the same version or an incomplete copy, the notification offers Install Backend or Update Backend. Robot Companion: Install or Update Backend in the Command Palette does the same for the active folder.
- A confirmation names the folder and interpreter, what is added or replaced (debugpy only when the environment has none), what stays unchanged (Python, Robot Framework, an existing debugpy, RobotCode and every other package) and the exact command. Cancel changes nothing.
- After you confirm, Robot Companion runs
<python> -m pip install --no-index --no-deps --force-reinstall … <bundled wheels>withPIP_USER=0, shows a cancellable progress notification and writes pip's output to the Robot Companion Backend output channel. Nothing is downloaded and no dependency is resolved, so no other package changes. - Robot Companion checks the environment again and compares the installed backend files with the bundled build. Only a match counts as installed: the folder's services then start.
Cancelling, a failing pip run (for example a read-only site-packages, an environment without pip
or one that refuses installs) or a mismatch after the run is reported with pip's last error and
the state the environment is now in, with Retry and Show Output. Retry asks for
confirmation again and installs the bundled build again, which also repairs a copy that pip left
incomplete. When a later Robot Companion version bundles another backend build, the installed one
no longer matches and Update Backend is offered the same way. When pip itself fails halfway
through replacing an older copy, it can leave an empty robot_companion_backend-<old>.dist-info
directory behind; Robot Companion ignores it and does not delete it (pip then prints a warning
that it skips that entry).
Robot Companion never installs, upgrades or removes Python, Robot Framework or RobotCode, and it does not offer an install in an environment without Robot Framework or with an unsupported Python/Robot Framework combination. RobotCode can stay installed in the same environment. An existing debugpy of another version is left alone; Python debugging inside Robot runs then needs debugpy 1.8.22. Without debugpy (or with debugpy files but no metadata, after an interrupted install) the services still start, the status names the missing debugpy, and Install Backend adds only the bundled debugpy. Installing the backend yourself (the Windows setup guide) remains possible for offline or managed machines; the same checks apply to that copy.
Checked in a normal VS Code window with real input (npm run test:project-environment): two
folders, one choosing a Python 3.11 / Robot Framework 7.3.2 interpreter through Enter path…, the
other first on the .venv fallback and then its .venv interpreter (Python 3.13 / Robot Framework
7.5); the language, discovery, debug, Run Test, Run Suite and Test Explorer processes, the
robotCommand and nativeBackendExecutable overrides, an interpreter without the backend, a Ctrl+Q
restart and Restricted Mode with Trust. Windows uses the same paths (Scripts\python.exe)
but has not been checked live; the Python extension source is covered only by its synthetic test
provider.
A selected Python without Robot Framework offers Select Environment and Install
robotframework. Installation has a separate confirmation naming the interpreter, folder and
<python> -m pip install robotframework; Cancel starts nothing. Confirmed installation uses that
exact interpreter without a shell, with cancellable progress and a 120-second bound. It is
exclusive with test runs and never starts from selection/detection alone: starting a run meanwhile
says that robotframework is being installed in that interpreter. A cancelled or timed-out
installation keeps runs blocked until pip has exited; it is force-stopped after 250 ms, and runs
are allowed again at the latest two seconds after the cancel or timeout. Success is reported
only after a fresh Robot availability check. Executable-only choices have no inferred pip target.
In owned mode, editor Run actions use native Testing and its exact source/name-line selection, including repeated names. Test Results shows each selected test's status and output, with log/report actions for that run; Robot Companion Tests records service details. See Test Explorer.
Coexistence / standalone command execution. The remaining command-line and notification description in this section applies to the standalone runner:
<effective executable and leading arguments> [<robot.toml arguments...>] <robotArguments...> --outputdir <results folder> [--test <test name>] <suite file>
- A single test is selected with
--test. Robot Framework reads that value as a pattern, so*,?and[in the name are escaped (Sum * CheckbecomesSum [*] Check) and only that test runs. Robot Framework compares names ignoring case and spaces, so two tests whose names differ only in case or spacing are both run. - The process starts without a shell, in the workspace folder that contains the file (or the file's own folder if it is outside every workspace folder). Test names and paths are passed as single arguments and never interpreted by a shell.
- Only one run at a time: starting another while one is active tells you a run is already in progress.
| Setting | Default | Purpose |
|---|---|---|
robotCompanion.robotCommand |
robot |
Command that runs Robot Framework: a plain command (robot), an interpreter form (python3 -m robot), or an absolute path, quoted if it contains spaces ("/opt/my tools/.venv/bin/robot"). |
robotCompanion.robotArguments |
[] |
Extra arguments passed before the selection, one per entry, for example ["--loglevel", "DEBUG"]. Debugging uses them too, and the native language and discovery services apply their --pythonpath, --variablefile, --variable, --extension and --argumentfile (see Project Robot configuration). In owned mode with the native backend, the folder's robot.toml settings come first. |
robotCompanion.enableRunCodeLens |
true |
Show the Run Suite / Run Test CodeLenses. |
Standalone output and results (coexistence). The output channel Robot Companion Test Run opens when a run
starts. It begins with the exact command line, the working directory and the results folder,
then streams Robot Framework's console output live. Each run writes output.xml, log.html
and report.html to its own folder robot-runs/<YYYYMMDD-HHMMSS-mmm> in the extension's
workspace storage, or its global storage when no folder is open (both in VS Code's user data,
not in your repository; the Results: line shows the exact path). The newest 20 run folders
are kept. When the run ends, one notification states the result:
- passed (exit code 0),
- N tests failed (exit codes 1 to 250; 250 means 250 or more),
- could not run, with the exit code (exit code 251 or higher, or an exit code from 1 to 250 without any result file written),
- stopped by signal when the process was killed, or could not be started / not found when the command itself could not be started.
Passed and failed notifications offer Open Log and Open Report, which open that run's
files in your default browser; every result notification offers Show Output. Robot Companion sets
its own --outputdir after robotArguments; options such as --log NONE in
robotArguments still apply, and Open Log then says the file was not written.
Workspace trust. Running tests starts a program chosen by settings, so it requires a
trusted workspace. In a trusted workspace, opening or switching to a .robot file runs an
availability check of that file's effective environment for the status item: it starts the
selected Python or Robot executable with a version probe (and, for the Python extension
source, asks that extension for its interpreter), never a test. A recent result is reused for up to
30 seconds, five after a failure. In Restricted Mode environment detection, Python API activation,
installation, and the run CodeLenses/commands start nothing and
explain that the workspace must be trusted (Manage Workspace Trust). Trust is checked again
immediately before each process or Python API activation, including after confirmation. After
granting trust the status item reads Robot: Refresh required. The check then runs on the next
switch to a .robot editor, or on an explicit refresh: opening the picker checks every candidate
(again on its Refresh), and the status item is updated when the picker closes. If VS Code
reports a setting change when trust is granted, for example for a workspace
robotCompanion.robotCommand, the status refreshes at once, as after any change to that setting.
Tests and installation never auto-start.
robotCompanion.robotCommand and robotCompanion.robotArguments are restricted settings:
values from an untrusted workspace's settings are ignored. The read-only features
(documentation preview, hovers, Return Explorer, folding) also work in Restricted Mode; there,
documentation webviews do not load remote images.
Troubleshooting.
- Robot Framework command 'robot' was not found. Robot Framework is not installed or not on
the
PATHVS Code was started with. Install it (pip install robotframework) or pointrobotCompanion.robotCommandat it, for example"/path/to/project/.venv/bin/robot"or"/path/to/project/.venv/bin/python" -m robot. - could not run … exit code 1 and no results were written. Typical for
python3 -m robotwhen that interpreter has norobotframeworkmodule; Show Output shows Python's message. - exit code 252 (invalid test data or command line options). Check
robotArgumentsand the output; Robot Framework prints the reason there. - robotCompanion.robotCommand is empty or has an unclosed quote. Fix the setting; nothing was started.
- On Windows, point the setting at
robot.exeorpython.exe -m robot; batch files (.bat/.cmd) cannot be started without a shell.
Several folders, remote hosts and supported VS Code
Several workspace folders. Each folder has its own selected environment and its own
language, discovery and debug processes, started in that folder. Two folders can use different
supported runtimes side by side, for example Python 3.11 / Robot Framework 7.3.2 and Python 3.13 /
Robot Framework 7.5. The same Library shared_lib then resolves to each folder's own installed
library (hover, F12 and completion use the folder's own language service), a keyword only one
environment provides is an error only in the other folder, and Test Explorer runs each folder's
tests in its own interpreter. With several folders, each suite in Test Explorer is labelled with
its folder's name, for example Suite (Beta Projekt), so its accessible name has both names. A settings change in one folder (for
example robotCompanion.nativeBackendExecutable in its .vscode/settings.json) restarts only that
folder's services; the other folders keep their processes and their Problems entries. Debug
sessions of different folders can be paused at the same time; stopping one leaves the others
paused.
Remote, WSL and container hosts. Robot Companion is a workspace extension
(extensionKind: ["workspace"]). In a Remote-SSH, WSL or Dev Containers window it runs on the
remote extension host, so interpreters, .venv folders and backend executables are looked up and
started on that machine, never on the local one. Settings that name an executable
(robotCommand, nativeBackendExecutable, languageBackend, executionBackend,
discoveryBackend) are machine-overridable: a value in your local user settings does not
follow a remote window; set it in that host's Remote settings or in the folder's own settings.
They are restricted in an untrusted workspace, and nothing starts until the remote workspace is
trusted.
If the extension host ends without shutting down Robot Companion (a remote window disconnected for longer than its reconnection grace, or a crashed or killed host), a small helper that Robot Companion starts with the host's own runtime ends what was still running: Robot runs from Test Explorer and CodeLens, debug sessions with their Robot workers, the language and discovery services, and environment checks or installs (these are registered the same way, but the host-kill check below does not start one). A normal window close stops them as before.
What is checked, and the limits.
| Host | Status |
|---|---|
| VS Code 1.141.0, Linux (arm64), local window | Checked with real input, in a local window only. npm run test:multi-root: two folders on Python 3.11 / RF 7.3.2 and Python 3.13 / RF 7.5, with imports (hover, F12), diagnostics, a scoped restart, Test Explorer suite names and runs, and two concurrent debug sessions; completion is not exercised. npm run test:host-disconnect: a killed extension host and a graceful exit leave no process of the language and discovery services, a paused debug session with its Robot worker, a Test Explorer run and a CodeLens run; environment checks and installs are not exercised there |
| Windows x64, Python 3.11 / RF 7.3.2 | Not yet qualified for these multi-folder and host checks; the Windows CI covers its own smoke tests only |
| macOS | Not checked |
| Remote-SSH, WSL, Dev Containers | Not checked: no real remote server is available offline, and every check above ran in a local window. A remote host runs the same code for the workspace extension kind, machine-overridable executable settings, trust and the cleanup after a killed extension host |
VS Code for the Web, virtual workspaces (vscode-vfs, GitHub repositories) |
Not supported: the native services and runs need folders on the extension host's file system |
| VS Code older than 1.141.0 | Not supported. 1.141.0 is the only version the checks run, so it is the declared minimum (engines.vscode: ^1.141.0) |
Commands
All commands are under the Robot Companion category:
| Command | ID |
|---|---|
| Focus Return Explorer | robotCompanion.toggle |
| Open Current Documentation Block | robotCompanion.openCurrentBlock |
| Invalidate All Caches | robotCompanion.invalidateCaches |
| Show Output | robotCompanion.showOutput |
| Export Current Documentation as Markdown | robotCompanion.exportDocumentationMarkdown |
| Export Current Documentation as PDF | robotCompanion.exportDocumentationPdf |
| Export Selected Documentation as Markdown | robotCompanion.exportDocumentationSelectedMarkdown |
| Export Selected Documentation as PDF | robotCompanion.exportDocumentationSelectedPdf |
| Use Robot Companion as Default Folding Provider | robotCompanion.useAsDefaultFoldingProvider |
| Fold Documentation To Headlines | robotCompanion.foldDocumentationToHeadlines |
| Fold Documentation To Steps | robotCompanion.foldDocumentationToSteps |
| Unfold Documentation | robotCompanion.unfoldDocumentation |
| Select Robot Environment | robotCompanion.selectRobotEnvironment |
| Install or Update Backend | robotCompanion.installBackend |
| Run Test at Cursor | robotCompanion.runTestAtCursor |
| Run Suite | robotCompanion.runSuite |
| Search Keywords in Scope | robotCompanion.searchKeywords |
| Refresh Keywords | robotCompanion.keywordView.refresh |
| New Robot Notebook | robotCompanion.newRobotNotebook |
| Open Robot REPL | robotCompanion.openRobotRepl |
| Show Robot Session Variables | robotCompanion.showSessionVariables |
| Interrupt Robot Session | robotCompanion.interruptSession |
| Restart Robot Session | robotCompanion.restartSession |
| Stop Robot Session | robotCompanion.stopSession |
| Open Robot Log (Test Explorer item menu) | robotCompanion.openTestLog |
| Open Robot Report (Test Explorer item menu) | robotCompanion.openTestReport |
Insert Keyword Call and Go to Keyword Definition are in the Robot Keywords view's row context menu.
Settings
Robot Companion contributes 49 settings under the robotCompanion. prefix, covering feature
toggles, indexing scope, rendering depth, and cache behavior. The full list with descriptions
and defaults is available in the Settings UI (search for "Robot Companion").
The ones most worth knowing:
| Setting | Default | Purpose |
|---|---|---|
robotCompanion.indexImportFolderPatterns |
["**"] |
Which folders to index for Python/Robot definitions. |
robotCompanion.indexExcludeFolderPatterns |
[".git",".venv","venv","__pycache__","node_modules","tests"] |
Folders to skip while indexing. |
robotCompanion.returnFieldNameStyle |
camelcase |
Render return members as camelCase aliases, raw snake_case, or both. |
robotCompanion.umlautDecoratorNames |
["convert_umlaut_kwargs"] |
Name(s) of the decorator that maps ASCII argument spellings onto diacritic ones. |
robotCompanion.camelCaseAliasBaseNames |
["camelcase"] |
Base class names marking a type whose snake_case attributes are also readable in camelCase. Add your own converter base to make the setting above take effect. |
robotCompanion.enumCompletionDisplayMode |
name |
Show enum name, value, or both in completions. |
robotCompanion.enableReturnTypeDiskCache |
true |
Persist the worker return-type cache per workspace. |
robotCompanion.logLevel |
warn |
Verbosity of the Robot Companion output channel. |
robotCompanion.testProfiles |
[] |
Owned-mode Test Explorer run, coverage and debug profiles: a name, include/exclude tag patterns and Robot arguments (details). |
robotCompanion.continuousRunDelay |
1000 |
Milliseconds without another save before a Test Explorer continuous run starts (details). |
Narrowing indexImportFolderPatterns to the folders that actually contain your keyword
libraries (for example ["libs/**"]) is the main lever if indexing feels slow in a large
repository.
For documentation and release maintainers, follow the product privacy guidance.
Notes and limitations
- Behavior is non-invasive by default, but explicit actions such as argument insertion and documentation export do edit or write files, and Run Test / Run Suite start the configured Robot Framework command.
- Return resolution runs in a worker thread with a memory cache, and optionally a per-workspace
disk cache.
Invalidate All Cachesresets both. The separate native source/syntax cache checks current file contents on each request and is bounded to 512 files and 32 MiB of UTF-8 source per store; this is not a Python heap bound. It clears when the native language service restarts, so use Robot Companion: Restart Language Service to discard it. Invalidate All Caches does not evict that native cache. Workspace inventory scans and foreground requests remain synchronous; caching does not guarantee a fixed response time. - Supported literal keyword factories on an explicitly imported class can provide a Source Declaration: original source navigation, documentation and declared parameters. This source reading remains separate from a verified runtime keyword catalog; decorators may add or alter parameters. Computed names, unsupported/rebound factories and inherited methods from unresolved external bases can still leave navigation or metadata unavailable. Source-only declarations do not authorize rename or missing-import edits, or runtime argument-count diagnostics.
- Keyword-doc rendering is best-effort: ambiguous matches or docstring parse quirks show a warning banner, but the content still renders.
- Diagnostics go to the dedicated
Robot Companionoutput channel.
Development
npm install
npm run test:all # parser/render/environment checks + UI + environment hosts
npm run package
npm run test:ui downloads a VS Code build and runs the UI suite in an Extension Development
Host, so it needs network access on first run.
The offline pilot uses preinstalled VS Code, without fetching packages or VS Code:
mkdir -p .vscode-test
ln -sfn /opt/vscode-test/vscode-linux-arm64-1.141.0 .vscode-test/
xvfb-run -a npm run test:all
Set ROBOT_COMPANION_EVIDENCE_DIR to retain native CDP screenshots/actions and host invocation
records before owned profiles are removed. The environment host checks cover two identical-named
roots with a synthetic Python public-API provider, and a separate genuine Restricted Mode host.
Extension test hosts keep storage in memory and refuse modal prompts, so restart persistence
(graceful exit and relaunch with the same profile) and the real install confirmation run in normal
VS Code windows driven over CDP (tests/ui/cdp-host.js). These checks use custom dialog style; the
native Linux dialog is not exercised. Fixtures simulate Python/Robot and installation without a
network download; they are not proof of a genuine installed Python provider. Windows paths are
covered by deterministic simulation; live process/UI checks run on Linux under Xvfb.
The backend adapter migration is in progress. npm run test:backend-contract
checks its internal launch-descriptor and execution-context boundary without starting
Python or VS Code. npm run test:integration also checks LSP framing and lifecycle
against a local Node subprocess fixture, and the owned debug adapter lifecycle against a
local DAP fixture; neither proves real Robot backend support.
The UI suite includes an opt-in owned-language fixture test with actual editor clicks,
F12, Linux Peek keyboard input, Ctrl-click, Return Explorer definition-link clicks
(including alias, absent, ambiguous and stale targets), synchronization and process cleanup,
plus an owned-debug fixture test that clicks Run and Debug's start button and the debug
toolbar's stop button and checks the owned process exits, and an owned Test Explorer test
that expands a discovered suite, clicks a test to open its source and clicks its Run action.
A live Test Explorer suite (ROBOT_COMPANION_UI_SUITE=test-explorer, skipped when the
prepared Robot environment is absent) clicks multi-selected rows, Run Test, Debug Test,
Rerun Failed Tests and Stop against real Robot Framework runs and checks that each run's
process group is gone; it includes the native discovery suite
(ROBOT_COMPANION_UI_SUITE=native-discovery runs only that one, skipped when the native
backend venv cannot be built), which does the same with native language, debugging and
discovery and also clicks Refresh Tests and checks discovery failures, plus coverage and continuous runs
(ROBOT_COMPANION_UI_SUITE=coverage runs only those cases).
ROBOT_COMPANION_UI_SUITE=keywords runs only the Robot Keywords view, keyword search and
Python library rename suite (skipped when the native backend venv cannot be built).
Use ROBOT_COMPANION_UI_SUITE=language npm run test:ui for those focused suites, and
ROBOT_COMPANION_UI_EVIDENCE_DIR=/path/to/ui/screenshots to retain their screenshots
and action transcripts.
The UI suite's synthetic workspace has no project .venv, so its saved workspace settings
start in coexistence mode; each owned suite selects the mode and descriptors per folder.
npm run test:integration checks the shipped owned default.
For an offline prepared test host, set ROBOT_COMPANION_VSCODE_EXECUTABLE to its
VS Code executable before running the UI suite; the runner then skips version lookup
and download.
The Linux editor qualification requires a CSS viewport of 1280×900. On the pinned
VS Code 1.141.0/Xvfb host, use xvfb-run -a -s '-screen 0 1280x901x24' npm run test:all;
the one extra Xvfb pixel produces the required CSS height. Keep the suite's viewport
assertions enabled. See the preview UI qualification record
for baseline findings, fixture/default separation, evidence paths and offline launch details.
The native live cases build backend/ offline into an owned scratch venv
(tests/native-backend.js): pip --no-index from ROBOT_COMPANION_ROBOT_WHEELS
(default /opt/robot-wheels) with ROBOT_COMPANION_NATIVE_PYTHON (default python3.13,
python.exe on Windows; Python 3.11 or 3.13). On Windows the venv's Scripts\python.exe
and Scripts\robot-companion-backend.exe are used; set both variables to absolute paths
there. ROBOT_COMPANION_UI_SUITE accepts all (the default), language, test-explorer,
native-discovery, native-libraries and providers (see tests/ui/suite/suites.js);
native-libraries runs only the native class, dynamic and Run Keyword resolution suite.
With ROBOT_COMPANION_UI_REQUIRE_NATIVE=1 the run fails closed: an unavailable native
backend, an undeclared suite value, any failing or skipped test, or zero executed tests in
the run or in one of its test files makes it exit non-zero. Each run writes
ui-test-counts.json (passes, failures, pending and total per test file) and the backend
receipt native-backend-venv.json to ROBOT_COMPANION_UI_EVIDENCE_DIR; a required run
also writes its verdict, with any ROBOT_COMPANION_UI_GREP filter, to ui-run-result.json.
Without an evidence directory a required run still checks the counts, in its temporary
profile. For example:
ROBOT_COMPANION_UI_SUITE=native-libraries ROBOT_COMPANION_UI_REQUIRE_NATIVE=1 \
ROBOT_COMPANION_UI_EVIDENCE_DIR=/tmp/ui-evidence xvfb-run -a node tests/ui/run-ui-tests.js
npm run test:native-backend-layout checks the Windows and Linux venv layout and these
suite values on any host; it is logic coverage, not a Windows run.
The offline pilot uses preinstalled VS Code, without fetching packages or VS Code:
mkdir -p .vscode-test
ln -sfn /opt/vscode-test/vscode-linux-arm64-1.141.0 .vscode-test/
xvfb-run -a npm run test:all
Set ROBOT_COMPANION_EVIDENCE_DIR to retain native CDP screenshots/actions and host invocation
records before owned profiles are removed. The environment host checks cover two identical-named
roots with a synthetic Python public-API provider, and a separate genuine Restricted Mode host.
Extension test hosts keep storage in memory and refuse modal prompts, so restart persistence
(graceful exit and relaunch with the same profile) and the real install confirmation run in normal
VS Code windows driven over CDP (tests/ui/cdp-host.js). These checks use custom dialog style; the
native Linux dialog is not exercised. Fixtures simulate Python/Robot and installation without a
network download; they are not proof of a genuine installed Python provider. Windows paths are
covered by deterministic simulation; live process/UI checks run on Linux under Xvfb.
Additional docs:
- Inline documentation marker guide:
docs/INLINE_DOCUMENTATION.md - Release verification guide:
docs/RELEASE_CHECKLIST.md
License
MIT. See LICENSE.