Skip to content

Error in Debug Console When Executing Keywords at Breakpoint: TypeError: Keyword.run() missing context argument #1086

@gbhandarkavathe

Description

@gbhandarkavathe

Issue Summary:
When debugging a Robot Framework test case in Visual Studio Code with the Robotframework Language Server extension, I encounter an error when trying to execute keywords in the debug console. This error prevents expected command execution during debugging.

Description:
While debugging, I add a breakpoint in a test case and attempt to manually run a keyword (e.g., Should Be Equal) in the debug console to compare two variables. Instead of executing as expected, it throws the following error:

TypeError: Keyword.run() missing 1 required positional argument: 'context'

Environment:

  • IDE: Visual Studio Code
  • Extension: Robotframework Language Server
  • Libraries: robotframework-browser-18.5.1, DateTime
  • OS and Versions: Mac Os, Python 3.12.5 and robotframework-7.1

Steps to Reproduce:

  1. Use the sample test case below.
  2. Start debugging and pause at the Breakpoint.
  3. In the debug console, run Should Be Equal ${PREFERRED_DATE_TITLE} ${PREFERRED_DATE}.
  4. Observe the TypeError.

Sample Test Case:

*** Settings ***
Library    robotframework-browser
Library    DateTime

*** Variables ***
${PREFERRED_DATE_TITLE}    Fri, Nov 15, 2024
${PREFERRED_DATE}          Fri, Nov 15, 2024

*** Test Cases ***
Verify Preferred Date Title Matches Preferred Date
    Breakpoint
    Should Be Equal    ${PREFERRED_DATE_TITLE}    ${PREFERRED_DATE}

Expected Behavior:
Keywords should execute without context-related errors in the debug console at a breakpoint.

Request for Assistance:
Please advise on any known solutions or configurations to resolve this context error in the Robotframework Language Server debug console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions