local-addon-xdebug-control
local-addon-xdebug-control copied to clipboard
auto-filled xdebug.remote_host address doesn't work
The xdebug.remote_host address that local-addon-xdebug-control auto-fills in on my system is correct, but does not work. The only address I can get xdebug to work with is the local networking address 192.168.0.x given in the Mac > System Preferences > Network panel. (The commented out address below is the auto-filled address.) When testing, I disabled the Mac firewall completely.
Normally I'd be happy to have xdebug working with any address, but the Mac local address can change from time to time, making it necessary to reconfigure xdebug. That will be an ongoing annoyance, especially since the remote_host setting is not exposed in the local-addon-xdebug-control where it would be simple to get at.
Any clues you can give why the auto-filled address is failing would be appreciated.
Mac OSX: Sierra 10.12 IDE: PhpStorm version: 2017.3 Local Mac OSX PHP version: 5.6 Flywheel VM PHP version: 7.0.3 Xdebug version: 2.4
My php.ini settings in the Flywheel VM are:
xdebug.remote_host=192.168.0.102
;xdebug.remote_host=172.17.0.2
xdebug.show_local_vars=1
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_port=9004
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.remote_log=/app/public/xdebug-log/xdebug.log
Unsuccessful xdebug.log entry with auto-filled address:
Log opened at 2018-06-23 18:39:53 I: Connecting to configured address/port: 172.17.0.2:9004. E: Could not connect to client. :-( Log closed at 2018-06-23 18:39:53
Successful xdebug.log entry with manually-entered Mac networking address:
Log opened at 2018-06-23 19:02:07
I: Connecting to configured address/port: 192.168.0.102:9004.
I: Connected to client. :-)
->
I use Local on a Mac daily and XDebug with the pre-configured IP never failed to connect. The only instance where I've seen that fail is if some other virtual machine system is running. Might this be the case? Does this happen when using Flywheel in concert with other virtual machine tools (incl. Mamp, Virtual Box, Docker and/or Kitematic)? Or does this happen independently?
I have a similar problem because of xdebug.remote_host=172.17.0.2 won't work, no other VM actives or other tools.
I discovered this thread https://local.getflywheel.com/community/t/ip-of-host-available-within-site-container/3172 and tried to set the IP that the "/Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine" ssh local-by-flywheel "route | grep default" | awk '{ print $2 }' command show and it works correctly.
What I do not understand is where the 172.17.0.2 is retrieved? Would be possible to have another field in the xdebug settings where we can set a custom IP?