gwomacks / php-debug

Atom Text Editor package for PHP debugging
MIT License
119 stars 31 forks source link

vagrant can't connect #257

Closed fede-green closed 6 years ago

fede-green commented 6 years ago

Hello,

i'm trying to use xdebug on my vagrant machine(s), so i set up xdebug there with these values:

php_xdebug_default_enable: 1 php_xdebug_coverage_enable: 0 php_xdebug_cli_enable: 1 php_xdebug_remote_enable: 1 php_xdebug_remote_connect_back: 1 php_xdebug_idekey: atom-xdebug php_xdebug_max_nesting_level: 256 php_xdebug_remote_host: 10.0.2.2

but here's the xdebug log:

Log opened at 2017-10-17 04:45:02 I: Checking remote connect back address. I: Checking header 'HTTP_X_FORWARDED_FOR'. I: Checking header 'REMOTE_ADDR'. I: Remote address found, connecting to 192.168.123.1:9000. E: Could not connect to client. :-( Log closed at 2017-10-17 04:45:02

From atom all i can see is the debugger saying "Listening on address:port 127.0.0.1:9000...". Is there other logs i can search for?

EDIT

a-ha!! found it!! the reason was the address being set to 127.0.0.1! :) this configuration works:

ServerAddress: "192.168.123.1"

so at least i hope this can help out others! :)