Debugging Not Working on macOS Sierra

I am trying to get xdebug to work with PHPStorm on macOS Sierra. If I run a project using the built in web server and call phpinfo();, I am show that xdebug is installed. When I try to do "Web Server Debug Validation" however it always fails stating "Failed to execute validation scripts: 'Connection Refused'" If I generate the browser links to start xdebug through JetBrains tool, PHPStorm never gives me any dialog about an incoming xdebug connection.

How can I get this working? Or at the very least, what steps can I take to troubleshoot this further?

1
2 comments
Avatar
Permanently deleted user

Do you want to use the default Mac web server, I mean you should try the easy way through xampp. I had installed in Yosemite through xampp, and everything works perfectly. But, if you want to stick with the default one, then try this method, I am not sure if this will work or not.

Open phpstorm->Preference, search for xdebug, under PHP-> xdebug, check the port, if it is 9000, change it to 9003 or whatever you want to make it but make sure the port is not using any other Mac applications.

Also, change the port in PHP.ini file, which I am certain you should paste 4-5 lines at the end of the php.ini file, it looks like this

zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so xdebug.remote_enable=on

xdebug.remote_handler=dbgp

xdebug.remote_host=phpteam.dev

xdebug.remote_port=9003

Above line is from my php, change the port highlighted in bold.

Good luck.

 

0

Please sign in to leave a comment.