I am trying to setup Xdebug 3 in my development environment for OpenEMR. I am using WSL2 with docker and have configured all the settings accordingly. This is a snapshot of my xdebug.ini file:
zend_extension=xdebug
xdebug.discover_client_host=true
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.remote_enable=1
xdebug.log_level=7
xdebug.client_host=host.docker.internal
xdebug.log=/tmp/xdebug.log
xdebug.idekey=VSCODE
~
I have configured it and yet when I put in a breakpoint, the code executes, but it never goes into the IDE for the breakpoint. The Listen to Xdebug just stays there. I went through the logs, and this is what I found:
[23] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_FORWARDED_FOR,REMOTE_ADDR'.
[23] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[23] [Step Debug] INFO: Checking header 'REMOTE_ADDR'. [23] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 172.18.0.1:9003.
[23] [Step Debug] WARN: Creating socket for '172.18.0.1:9003', poll success, but error: Operation in progress (29).
[23] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: host.docker.internal:9003.
[23] [Step Debug] ERR: Time-out connecting to debugging client, waited: 200 ms. Tried: 172.18.0.1:9003 (from REMOTE_ADDR HTTP header), host.docker.internal:
[23] Log closed at 2023-10-03 11:15:07.346849
I have configured the chrome extension as well and when I try it, it doesn’t work. Any help would be much appreciated.