-
-
Notifications
You must be signed in to change notification settings - Fork 689
Open
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem?
Most people have no trouble using xdebug, and it works out of the box, but when people do have problems, they find it tedious and sometimes don't follow the instructions anyway.
Describe your solution
Create a ddev utility xdebug-diagnose along the lines of the new ddev utility mutagen-diagnose added in e661e0e
It should be implemented in go and should attempt to do all the things suggested in the troubleshooting section in https://github.com/ddev/ddev/blob/main/docs/content/users/debugging-profiling/step-debugging.md
- Detect whether IDE is already listening on host port 9003; if it is, require that to be fixed before continuing
- Listen on host on port 9003 (all interfaces, 0.0.0.0)
- Connect to
host.docker.internal:9003from inside web container (ddev exec) usingncto connect; should be possible then to send text both ways in that connection. - Disconnect from inside web container
- Use
ddev xdebug enableto enable xdebug - Do a simple PHP operation which will then connect to the listening host-side interface (which can then be analyzed)
It should also report all the key details we'd normally expect in a tool like this:
- IP address of host.docker.internal
- How that address was derived
- Ability to ping that address from inside web container
- Status of global
xdebug_ide_locationand whether it is the default or not (it's usually an error if it's not the default)
Describe alternatives
No response
Additional context
No response
Copilot