robotframework-lsp icon indicating copy to clipboard operation
robotframework-lsp copied to clipboard

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

Open gbhandarkavathe opened this issue 1 year ago • 1 comments

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.

gbhandarkavathe avatar Nov 12 '24 15:11 gbhandarkavathe

@gbhandarkavathe Robot Framework Language Server does not support RF 7.0 or newer. This 'internal' API of Robot Framework was changed in 7.0 or 7.1.

see: https://github.com/robocorp/robotframework-lsp/tree/master/robotframework-ls#maintenance-policy

you may want to use https://robotcode.io

Snooz82 avatar Dec 01 '24 16:12 Snooz82