I am working with the Magento 2.3, and using the PHPStorm as a IDE. Recently I've configured the xdebug in my local for identify some process flow. But it does not helped me to checked the flow.

Then I hit the website in local, I am facing the Uncaught Error: Call to undefined function xdebug_disable() in vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php on line 73

I've checked with google bug I couldn't find any proper solution for this. Right now I am using the nginx with PHP7.2

I am looking forward to your support to fix the problem.

5 Answers 5



From :-

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

To :-

if (!(bool)$debugMode && extension_loaded('xdebug')) {
    if (function_exists('xdebug_disable')) {
  • 1
    This was a quick workaround that worked for me.
    – Jiyaad.D
    Jan 11, 2021 at 9:25

You're using Xdebug 3, Magento 2.3 only supports Xdebug 2. You need to downgrade your locally installed Xdebug to the latest version in the 2.x release - pecl install -f xdebug-2.9.8 should work I believe, assuming you have pecl installed.

  • Is that right version?
    – senthil
    Dec 29, 2020 at 2:11
  • 1
    it was still not working after downgrade xdebug
    – Zahirabbas
    Jan 8, 2021 at 12:44
  • I tried the above mentioned command in my system, but it's not install the xdebug, do you any other command to install the particular xdebug version
    – senthil
    Jan 12, 2021 at 5:31
  • Its also not installing xdebug for me as well, any one had fixed it ? Jan 17, 2021 at 11:22
  • why is it not installing xdebug? what error are you getting?
    – user50070
    Jan 19, 2021 at 13:49

This is a bug in magento2-functional-testing-framework which conflict with xdebug 3, bacause xdebug_disable() was removed in Xdebug 3.

The bug was fixed in the magento2-functional-testing-framework version 3.2.1.

Before the new version is merged in Magento, we could use the quick workaround which from the commit MQE-2391: [GitHub Issue] Magento fails with xdebug 3 due to mftf in version 3.2.1:

In the file dev/tests/functional/standalone_bootstrap.php remove the codes below

if (!(bool)$debug_mode && extension_loaded('xdebug')) {

In the file src/Magento/FunctionalTestingFramework/_bootstrap.php remove the codes below

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

I faced the same issue after updating and upgrading my Ubuntu server. I needed to downgrade xDebug version to fix this issue for Magento 2.4.1 and PHP7.4:

sudo pecl install -f xdebug-2.9.8

If you get “phpize: command not found” error, you can run pecl command again:

sudo apt-get install php7.4-dev

I use multiple PHP versions on my server. For older version like PHP7.3, you modified its php.ini file and add the path of xdebug-2.9.8. On ubuntu, I edited php.ini by running:

sudo vi /etc/php/7.3/fpm/conf.d/20-xdebug.ini

and added:



To add on to smstl's answer, which is correct, the problematic files comes from \Magento\FunctionalTestingFramework, which you can remove if not used by running: composer remove --dev magento/magento2-functional-testing-framework

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.