PHP 8 XDebug Error - Custom Environment, macOS (5.9.7)

Issue Summary

Greetings. I’m getting the following error fooding my logs when I upgrade my sites or add new ones in Local to PHP 8.0.0 (custom environment, nginx):

Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(

Is there a way to get rid of this notice while still having XDebug enabled?

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?

    • All custom environment sites that I add new or upgrade from PHP 7.4.1 to 8.0.0.
  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

    • Yes. If I create a new site using custom environment with PHP 8.0.0, I get the same error flooding the logs.

Replication

  1. Create new site using custom environment, nginx, MySQL 8, PHP 8.0.0
  2. Load site in browser
  3. See logs/php/error.log

System Details

  • Which version of Local is being used?

    • Local 5.9.7+5156
  • What Operating System (OS) and OS version is being used?

    • macOS Catalina (10.15.2)
  • Attach the Local Log. See this Community Forum post for instructions on how to do so:

    • Not much to attach. It’s the same error repeating:
[14-Jan-2021 16:08:10 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:10 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:10 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:10 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:11 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:11 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:12 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:12 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:12 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:12 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:14 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:14 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:16 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:16 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[14-Jan-2021 16:08:16 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: 127.0.0.1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(

Thank you.

Please see, Install PHP 8

Thank you. I upgraded to Local 5.9.8 and tried changing/adding some of the xdebug options in conf/php-8.0.0/php.ini.hbs, restarted the sites, but it didn’t make a difference. I still have the xdebug error flooding the error.log.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.