0

How do I setup XDebug in AMPPS and Atom? I spent 4 hours, still unable to make it work. I want to use PHP 7.1, so on ampps, i changed php version to 7.1 and installed xdebug with

brew install php71-xdebug

added the following config in application/AMPPS/php-7.1/etc/php.ini

[xdebug]
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1    # Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
zend_extension="/usr/local/opt/php71-xdebug/xdebug.so"

Used the following code

<?php
phpinfo();
?>

I don't see xdebug in the output. I put debug breakpoint in the second line in atom, but not working.

When I ran Run php -i "(command-line 'phpinfo()')" got the following error

Failed loading /usr/local/opt/php71-xdebug/xdebug.so: dlopen(/usr/local/opt/php71-xdebug/xdebug.so, 9): no suitable image found. Did find: /usr/local/opt/php71-xdebug/xdebug.so: mach-o, but wrong architecture -bash: Run: command not found

log has the following Failed loading /usr/local/opt/php71-xdebug/xdebug.so: dlopen(/usr/local/opt/php71-xdebug/xdebug.so, 9): no suitable image found. Did find: /usr/local/opt/php71-xdebug/xdebug.so: mach-o, but wrong architecture

user43286
  • 2,261
  • 3
  • 31
  • 42

0 Answers0