Search code examples
phpmampxdebugosx-elcapitanbitnami

xdebug not showing up in php info


php.ini

zend_extension="/Applications/mampstack-5.6.18-0/php/lib/php/extensions/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/tmp

I followed all the steps in the https://xdebug.org/wizard.php

Xdebug installed: no
Server API: Apache 2.0 Handler
Windows: no
Zend Server: no
PHP Version: 5.6.18
Zend API nr: 220131226
PHP API nr: 20131226
Debug Build: no
Thread Safe Build: no
Configuration File Path: /bitnami/mampstack-osx-x64/output/php/lib
Configuration File: /Applications/mampstack-5.6.18-0/php/etc/php.ini
Extensions directory: /Applications/mampstack-5.6.18-0/php/lib/php/extensions



Download xdebug-2.4.0rc4.tgz
Unpack the downloaded file with tar -xvzf xdebug-2.4.0rc4.tgz
Run: cd xdebug-2.4.0rc4
Run: phpize (See the FAQ if you don't have phpize.

As part of its output it should show:

Configuring for:
...
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.

Run: ./configure
Run: make
Run: cp modules/xdebug.so /Applications/mampstack-5.6.18-0/php/lib/php/extensions
Edit /Applications/mampstack-5.6.18-0/php/etc/php.ini and add the line
zend_extension = /Applications/mampstack-5.6.18-0/php/lib/php/extensions/xdebug.so
Restart the webserver

php -v

PHP 5.5.30 (cli) (built: Oct 23 2015 17:21:45) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

But still not showing up


Solution

  • Bitnami Developer here,

    MAMP 5.6.18 includes Xdebug. However, it has a minor issue that we are working on fixing for the next revision.

    Anyway, you can follow the steps below:

    brew install autoconf automake
    /Applications/mampstack-5.6.18-0/use_mampstack
    curl > 'xdebug-2.4.0RC4.tgz' https://pecl.php.net/get/xdebug-2.4.0RC4.tgz
    tar -zxf xdebug-2.4.0RC4.tgz
    cd xdebug-2.4.0RC4/
    export PHP_AUTOCONF=/usr/local/bin/autoconf
    export PHP_PREFIX=/Applications/mampstack-5.6.18-0/php
    phpize
    ./configure --enable-xdebug
    make
    sudo make install
    

    Then, you only need to add the code below in /Applications/mampstack-5.6.18-0/php/etc/php.ini:

    ;[XDebug]
    ;; Only Zend OR (!) XDebug
    zend_extension="/Applications/mampstack-5.6.18-0/php/lib/php/extensions/xdebug.so"
    ;xdebug.remote_enable=true
    ;xdebug.remote_host=127.0.0.1
    ;xdebug.remote_port=9000
    ;xdebug.remote_handler=dbgp
    ;xdebug.profiler_enable=1
    ;xdebug.profiler_output_dir=/tmp
    

    Restart the services:

    /Applications/mampstack-5.6.18-0/ctlscript.sh restart
    

    You can check it executing php -m | grep xdebug.

    I hope it helps.