Hey David
Yup those port 8080 (http) and 8443 (https) were setup in your DevKinsta for the NGINX part, that’s fine.
Yes, you’re correct! XDebug is included with the devkinsta_fpm Docker image starting with DevKinsta 2.8.0. By default, in the “Site configurations” section of each site in DevKinsta, the Xdebug option shows as enabled (green toggle).
Looks like it’s expected to get those messages (like I mentioned above) filled up in the xdebug.log
file ( I could see the same on both my Windows and Linux machines ) .
I checked further in my devkinsta_fpm
container on Linux, and noticed, this line:
xdebug.start_with_request=yes
that’s defined in the following files:
/etc/php/7.4/mods-available/xdebug.ini
/etc/php/8.0/mods-available/xdebug.ini
/etc/php/8.1/mods-available/xdebug.ini
/etc/php/8.2/mods-available/xdebug.ini
which seems to be the reason of those messages, like:
[Step Debug] ERR: Could not connect to debugging client. Tried: host.docker.internal:9000 (through xdebug.client_host/xdebug.client_port).
Example the contents of xdebug.ini look like these:
root@a8161dfb48b0:/www/kinsta# cat /etc/php/8.0/mods-available/xdebug.ini
zend_extension=xdebug.so
xdebug.mode=develop,debug
xdebug.start_with_request=yes
xdebug.client_host=host.docker.internal
xdebug.client_port=9000
xdebug.log = /var/log/fpm/xdebug.log
xdebug.log_level = 1
I then made the following steps to test further:
- I connected to the devkinsta_fpm container as root with this command:
docker exec -it devkinsta_fpm bash
- In that devkinsta_fpm container, I downloaded/installed
nano
(text editor) , so I could edit the xdebug.ini file easily, with this command line:
apt-get update && apt-get install nano
- Once
nano
has been installed in that container, I opened those xdebug.ini files with nano
, with the following (1 at a time):
nano /etc/php/7.4/mods-available/xdebug.ini
nano /etc/php/8.0/mods-available/xdebug.ini
nano /etc/php/8.1/mods-available/xdebug.ini
nano /etc/php/8.2/mods-available/xdebug.ini
- In that nano editor, I changed this line
xdebug.start_with_request=yes
(in each of those xdebug.ini files of those PHP folders) to be as follow:
xdebug.start_with_request=trigger
(pressed “Control O” and Enter, to write/save the changes in Nano editor)
- After those 4 xdebug.ini files have been changed, I also went to DevKinsta → Sites → my Site Name → Wrench icon (Site configurations) , and there in the “PHP.ini Editor” section I added this line as well (and clicked “Save changes” button ):
xdebug.start_with_request=trigger
After that, I’m No longer seeing my xdebug.log
file getting filled with those messages mentioned above.
So I think, you may want to either just ignore those messages in the xdebug.log and the error.log - as those were not critical or fatal error (and should not affect your site at all),
OR
if you don’t want those messages filling up in your log files, then you may want to consider the steps I took (mentioned) above, and see if that will stop those messages to be logged in your xdebug.log and/or error.log files.
Cheers,
Agus