Skip to content

Commit c3f4fd7

Browse files
committed
Build/Test Tools: Improve Xdebug cross-platform compatibility.
Updates the Xdebug configuration in the local Docker environment to better support Windows (WSL2) users while maintaining stability for macOS and Linux. * Enables `xdebug.discover_client_host` to allow Xdebug to automatically connect back to the IP address listed in the HTTP request headers, ensuring the debugger works reliably regardless of specific network topology. * Sets `xdebug.client_host` to `host.docker.internal` as a fallback for `xdebug.discover_client_host`. In WSL2 networking, `localhost` resolves to the container itself rather than the host machine, preventing the debugger from connecting to the IDE; `host.docker.internal` correctly routes to the host machine across platforms. Follow-up to [60060]. Reviewed-by wildworks. Merges [61461] to the 6.9 branch. Props SirLouen, jdeep, westonruter. See #49953. Fixes #63979. git-svn-id: https://develop.svn.wordpress.org/branches/6.9@61541 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 8aa02bf commit c3f4fd7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/local-env/php-config.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ error_reporting = -1
33
upload_max_filesize = 1G
44
post_max_size = 1G
55
xdebug.start_with_request=trigger
6+
xdebug.discover_client_host=true
7+
xdebug.client_host=host.docker.internal

0 commit comments

Comments
 (0)