How to Disable Xdebug

How to disable XDebug

Find your php.ini and look for XDebug.

Set xdebug autostart to false

xdebug.remote_autostart=0  
xdebug.remote_enable=0

Disable your profiler

xdebug.profiler_enable=0

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?

Disabling xdebug when running composer

You can disable Xdebug setting an environment variable:

XDEBUG_MODE=off composer install

It's available using XDebug 3.

Disable Xdebug 3 Could not connect message in CLI

Unfortunately, the only way to disable this error is to disable generally ALL errors & warnings in xdebug.ini:

xdebug.log_level = 0

Hopefully there are other ways in future xdebug versions (imho this should only be a weak warning).

EDIT: As LazyOne mentioned, it's also possible to set an value for error_log in php.ini, for example /var/log/php_error.log. With that change, the log entries are written to this file and not sent to stderr.

How to disable xdebug during laravel installation via composer

You should temporarily disable xdebug in your console's php.ini before installation dependencies with Composer:

# Set xdebug autostart to false
xdebug.remote_autostart=0
xdebug.remote_enable=0

# Disable your profiller
xdebug.profiler_enable=0

And enable it when composer install/composer update finished.

Also, you can add xdebug_disable() function in your console PHP file if you don't want to enable/disable it in php.ini each time when work with Composer:

if (function_exists('xdebug_disable')) {
xdebug_disable();
}

How to stop Xdebug to stop debugging itself?

You can use the .user.ini files that you can use as equivalence to .htaccess files. The .user.ini file should just contain the following:

xdebug.profiler_enable=0

Disable xDebug on phpMyAdmin

You can just turn off the debug connection listener by going to Run > Stop Listening for PHP Debug Connections.

PHPStorm will then ignore any connections from Xdebug. When you want to debug something again simply go to Run > Start Listening for PHP Debug Connections and it'll work again.

You could also permanently ignore those files by using Skipped Paths:

  • Go to Preferences
  • Go to Languages & Frameworks > PHP > Debug > Skipped Paths
  • Click the '+' sign to open a browse dialog
  • Browse to the web root where the phpmyadmin folder is located and select that folder
  • Click OK and exit out of preferences

The debugger should now ignore scripts in that directory.

Xdebug: How to disable 'xdebug.halt_level'

I ended up using Codelobster to debug my PHP code instead of XDebug, it was the easiest solution for me.

Disable xdebug during scrutinizer inspections

I was able to accomplish this by editing my project's .scrutinizer.yml to include:

build:
dependencies:
before:
- "find /home/scrutinizer/.phpenv/versions -name 'php.ini' -exec sed -i 's/^zend_extension_ts/;zend_extension_ts/' {} \\;"

XDebug, how to disable remote debugging for single .php file?

As I've investigated I should set xdebug.remote_autostart=0
See documentation: http://xdebug.org/docs/remote

Important! You should change this value through php.ini. Using function ini_set('xdebug.remote_autostart', 0) won't work because sesion has already started and you'll be still getting xdebug information to your remote host.



Related Topics



Leave a reply



Submit