Install & enable xDebug with PHP v7.2 in Mac OSX

Last Updated at : February 26, 2019 By - Usama Muneer | 149

    Install xDebug with pecl

    • Step # 01

    pecl install xdebug

    If encountered with error?

    which pecl

    its located at :

    cd /usr/local/Cellar/php/7.2.6/

    if you look in this directory, there’s a pecl symlink, simply remove and try installing it again.

    rm -rf pecl

    Perform step 1 now.

    It should now install fine without any errors.

    • Step # 02

    Bu default, xDebug extension added to your php.ini file but we need to add complete path for xDebug to make it work.

    locate your php.ini

    php --ini
    subl /usr/local/etc/php/7.2/php.ini
    • Step # 03

    Add the extension in php.ini


    • Step # 04

    Restart your server, in my case, Its valet.

    valet restart

    It should restart without any warnings or errors. Cheers.

    blog user
    Usama Muneer

    A web enthusiastic, self-motivated & detail-oriented professional Full-Stack Web Developer from Karachi, Pakistan with experience in developing applications using JavaScript, WordPress & Laravel specifically. Loves to write on different web technologies with an equally useful skill to make some sense out of it.

    Related Posts

    Importing Excel files come handy when you’re building some large scale inventory kind of an application where you need to import set of data from CSV or excel files. In this short tutorial, we’ll go through on importing excel files with Laravel & look on for some crazy hacks and tricks in between.

    Gear up fellow developers, another Laravel Meetup is coming back to Lahore & it will be a great milestone while helping our fellow web developers across the city to become motivated and will help them grow as Laravel developers.

    Getting an app developed is not the only thing that one needs to ensure in terms of digital visibility and e-commerce. Yes, having an app is important but to stay updated and to be abreast with the competition Optimization of performance is necessary.

    There are many requiring paid products for this purpose, but we would like to select free of charge very functional and at the same time of simple in the use editor - Codelobster PHP Edition.