Skip to content

[QUESTION] How to get debug execution to pause on breakpoints in Robot Initialization files? #515

@bruss-22

Description

@bruss-22

Please describe.
Not sure if I am missing a setting, or maybe a bug.
When I set a breakpoint within a User Keyword contained within a __init__.robot initialisation file, the execution never pauses at those breakpoints. However, execution will pause at breakpoints within a User Keyword that is subsequently called by the first keyword.

I have a simple repo that demonstrates

/repo/tests.robot

*** Test Cases ***
When I Run The Test The Breakpoints In the Initialization Files Do Not Stop The Execution
    Pass Execution  Successfully ran the test case.

/repo/__init__.robot

*** Settings ***
Resource  other-keyword.robot

Suite Setup    User Keyword 1
    
*** Keywords ***
User Keyword 1
    User Keyword 2

/repo/other-keyword.robot

*** Keywords ***
User Keyword 2
    No Operation 

With breakpoints enabled on the call to User Keyword 2 and on the No Operation statement, execution only pauses at the No Operation statement. The call stack window does show that the execution is via the __init__.robot file, but is showing Unknown Source for User Keyword 1

Desktop (please complete the following information):

  • VS Code Version [1.103.1]
  • RobotCode Version [1.9.0]
  • OS: [Windows 11]
  • Python Version [3.12.2]
  • RobotFramework Version [7.3.2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions