View Issue Details

IDProjectCategoryView StatusLast Update
0002219XdebugUncategorizedpublic2024-04-16 15:12
Reporterderick Assigned Toderick  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Target Version3.3devFixed in Version3.3.0 
Summary0002219: Add control socket on LInux to obtain information and initiate debugger or breakpoint

On Linux, check for incoming commands on the control second every 25ms, unless xdebug.control_socket is set to off (or 0).

Through this control socket, an external tool can send commands to Xdebug.

The implemented commands are:

ps to obtain basic process information
pause, to initiate the debugger and break, or if a debugger is already running, initiate a breakpoint.

TagsNo tags attached.
Operating SystemLinux
PHP Version8.2.0-8.2.9



2024-04-15 20:13

reporter   ~0006917

Hey, I'm the author of the "original" issue:

First of all, thank you. That would make lives of hundreds of developers much better :)

Second, there's a little concern: correct me if I'm wrong, but previously the connection was always initiated by PHP to the IDE. In a containerized environment, PHPStorm would even automatically specify the xdebug.client_host as host.docker.internal, so that the connection reaches the IDE. It doesn't require any additional configuration from either IDE or PHP side. With sockets, that'd no longer be the case: the socket file has to be bound from the container to host's filesystem so it can be accessed by an IDE. Additionally, IDEs would not be able to automate the configuration, as the path to the socket file would have to be specified by hand for every project. It's not a huge problem, but still something I noticed.

Anyways, do you want me to also create a ticket on PHPStorm's side so they can acknowledge the change and possibly start working on the integration? Thanks


2024-04-16 15:12

administrator   ~0006923

I think there are a few things here, that I need to clarify:

  • Each PHP request will have its own socket file.
  • It is possible (for an IDE) to enumerate these sockets, like I do here:
  • This only works if the IDE runs on the same host as Xdebug, or, you can run a small or binary script inside the host
  • VS Code has experimental support, once that is merged, we can poke PhpStorm people
  • Xdebug could also send the socket location in the init package, so that the IDE knows which one belongs to that running script. I've made a ticket for that:

Issue History

Date Modified Username Field Change
2023-11-30 16:50 derick New Issue
2023-11-30 16:50 derick Assigned To => derick
2023-11-30 16:50 derick Status new => closed
2023-11-30 16:50 derick Resolution open => fixed
2023-11-30 16:50 derick Fixed in Version => 3.3.0
2024-04-15 20:13 Alex_Wells Note Added: 0006917
2024-04-16 15:12 derick Note Added: 0006923