Skip to content

[QUESTION] How to attach python debugger properly ? #264

@BriceBoy

Description

@BriceBoy

I would like to know how to configure python debugger properly. Before, I could just debug tests and use breakpoints in python code but I can't seem to do it properly. When it hits a breakpoint it does not open the file the breakpoint is in and I can't see variables values.

I can see that it's stopped on a breakpoint :
image

If I go to the file it's stopped in, I can't seem to see variables values :
image

Here is my actual configuration

"launch": {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "RobotCode: Run Current",
                "type": "robotcode",
                "request": "launch",
                "cwd": "${workspaceFolder}",
                "target": "${file}"
            },
            {
                "name": "RobotCode: Run All",
                "type": "robotcode",
                "request": "launch",
                "cwd": "${workspaceFolder}",
                "target": "."
            },
            {
                "name": "RobotCode: Default",
                "type": "robotcode",
                "request": "launch",
                "purpose": "default",
                "presentation": {
                    "hidden": true
                },
                "attachPython": true,
                "pythonConfiguration": "RobotCode: Python",
                "args": [
                    "--debugFile", "debug",
                    "--loglevel", "TRACE"
                ],
            },
            {
                "name": "RobotCode: Python",
                "type": "debugpy",
                "request": "attach",
                "presentation": {
                    "hidden": true
                },
                "justMyCode": false,
            }
        ]
    }
  • VS Code Version 1.90.0
  • RobotCode Version 0.83.1
  • OS: Windows
  • Python Version 3.12.2
  • RobotFramework Version 7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions