How to disable XDebug

04/11/2020 07:30:01

I think that my server became slow since I installed XDebug. So, in order to test my hypothesis I want to disable XDebug completely. I've been searching for tutorials on how to do this but I can't find such information.

Verified Answer (156 Votes)

01/06/2012 12:57:26

Find your php.ini and look for XDebug.

Set xdebug autostart to false


Disable your profiler


Note that there can be a performance loss even with xdebug disabled but loaded. To disable loading of the extension itself, you need to comment it in your php.ini. Find an entry looking like this:

zend_extension = "/path/to/php_xdebug.dll"

and put a ; to comment it, e.g. ;zend_extension = ….

Check out this post XDebug, how to disable remote debugging for single .php file?


Answer #2 (97 Votes)

04/13/2015 16:30:00

An easy solution working on Linux distributions similar to Ubuntu

sudo php5dismod xdebug
sudo service apache2 restart

Answer #3 (34 Votes)

08/16/2016 17:16:00

In Linux Ubuntu(maybe also another - it's not tested) distribution with PHP 5 on board, you can use:

sudo php5dismod xdebug

And with PHP 7

sudo phpdismod xdebug

And after that, please restart the server:

sudo service apache2 restart
Hack Hex uses Stack Exchance API by the Stack Exchange Inc. to scrape questions/answers under Creative Commons license.