Skip to content

Breakpoints not hit when running script #80

@kczx3

Description

@kczx3

Preface: I am debugging on a Remote SSH host.

When running an actual PHP script (opposed to listening for a connection), I can't get any breakpoints to trigger. Using xdebug_break() works but not setting a line breakpoint.

The first debug task works fine when the page is loaded in a browser. The second when executed on my server does not stop at the breakpoint. Modifying a file that gets included by the main script to have a line with xdebug_break() does cause the script to stop execution and allow for variable inspection. I know this might be more of a Xdebug specific question though so feel free to send me that way if appropriate.

[
    {
        "label": "Listen for Xdebug",
        "request": "launch",
        "adapter": "Xdebug",
        "program": "",
        "xdebugSettings": {
            "max_children": 100,
            "show_hidden": 1
        }
    },
    {
        "adapter": "Xdebug",
        "request": "launch",
        "label": "batch_job.php (Xdebug)",
        "args": ["mayarg"],
        "program": "scripts/batch_job.php",
        "stopOnEntry": false,
        "xdebugSettings": {
            "max_children": 100,
            "show_hidden": 1
        }
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions