Skip to content

mac: xdebug terminates without any good explaination #123

@olabri

Description

@olabri

Cannot get xdebug to work for mac. Not sure what the problem is as log is non-descriptive. I noticed that using debug.json instead of vscode settings connects to a random port. Not sure if that is the core problem as vscode settings results in same error.

Trying in ddev container and local script results in same error as well.

debug.json:

[
  {
    "name": "DDEV Listen for Xdebug",
    "label": "PHP: Listen to Xdebug",
    "adapter": "Xdebug",
    "request": "launch",
    "hostname": "0.0.0.0",
    "port": 9003,
    "pathMappings": {
         "/var/www/html": "$ZED_WORKTREE_ROOT"
       },
  },
]

running results in:

2026-05-15T09:08:19+02:00 INFO  [dap::transport] Debug adapter has connected to TCP server 127.0.0.1:57669
2026-05-15T09:08:19+02:00 ERROR [debugger_ui::debugger_panel]                                                                                                                                                                         
error: process exited before debugger attached.   

using the working vscode config gives this (mark this connects to correct port):

2026-05-15T09:10:37+02:00 INFO  [dap::transport] Debug adapter has connected to TCP server 127.0.0.1:9003
2026-05-15T09:10:37+02:00 ERROR [debugger_ui::debugger_panel]
error: process exited before debugger attached.

(dev: copy debug adapter arguments)
Image
dev: open debug adapter logs:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions