Skip to content

Debugger: (php) process exited before debugger attached #40887

@GuiEpi

Description

@GuiEpi

Summary

PHP Xdebug does not start with the error "process exited before debugger attached".

I'm aware of a similar issue that was closed for Python, but that error was related to "pip not installed" whereas I'm experiencing this issue with PHP.

Just for your information, xdebug works well on vscode.

Description

Steps to trigger the problem:

  1. Create a debug.json with Xdebug configuration as shown in the documentation
// Project-local debug tasks
//
// For more documentation on how to configure debug tasks,
// see: https://zed.dev/docs/debugger
[
  {
    "label": "PHP: Listen to Xdebug",
    "adapter": "Xdebug",
    "request": "launch",
    "initialize_args": {
      "port": 9003
    }
  }
]
  1. Start debug session

Expected Behavior:

The debug session is successfully started.

Actual Behavior:

The debug session is not started, and the following output appears in the console:

error: 
error: process exited before debugger attached.

Zed logs:

2025-10-22T14:08:40+02:00 INFO  [dap::transport] Debug adapter has connected to TCP server 127.0.0.1:33965
2025-10-22T14:08:40+02:00 ERROR [debugger_ui::debugger_panel] 
error: process exited before debugger attached.

Zed Version and System Specs

Zed: 0.208.6
OS: Ubuntu 24.04.3 LTS
Memory: 64.0 GiB
Architecture: 64-bit
CPU: Intel® Core™ i5-10210U × 8
GPU: Intel® UHD Graphics (CML GT2)

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions