one magento developer

my experiences about magento

Fatal error: Uncaught Error: Call to undefined function xdebug_disable() in Magento 2

How we can fix Fatal error: Uncaught Error: Call to undefined function xdebug_disable() error?

it can be happen when you want to install xdebug. you can simple remove xdebug and all thing worked perfectly or not you can change Magento core code.

find vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php file and, find below codes

if (!(bool)$debugMode && extension_loaded('xdebug')) {
    xdebug_disable();
}

Now, you can change the code like this.

if (!(bool)$debugMode && extension_loaded('xdebug')) {
    if (function_exists('xdebug_disable')) {
        xdebug_disable();
    }
}

also, here is a git link to install xdebug correctly.

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>