Uncaught Error: Call to undefined function xdebug_disable()

During installation the Magento 2.3.4 using Terminal in Ubuntu in my local system.

I got the PHP Fatal error: Uncaught Error: Call to undefined function xdebug_disable() in vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php:73

To remove this Error you have to follow steps:-

Step1:- We have to go to the vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php:73.

Step2:-Open the _bootstrap.php by Editor(Notepad,Phpstrom etc).

Step3:-Find the code:-

// add the debug flag here
$debugMode = $_ENV['MFTF_DEBUG'] ?? false;
if (!(bool)$debugMode && extension_loaded('xdebug')) {
    xdebug_disable();
}

Screenshot1:-

Step4:-Replace with the following code-

// add the debug flag here
$debugMode = $_ENV['MFTF_DEBUG'] ?? false;
if (!(bool)$debugMode && extension_loaded('xdebug')) {
    if (function_exists('xdebug_disable')) {
        xdebug_disable();
    }
}

Screenshot2:-

Save the code and run the terminal again.

PHP Fatal error will be solved.

Total Page Visits: 13291 - Today Page Visits: 6

Leave a Reply