Tag Archives forphp

Disable xdebug for one run

This script disables xdebug for one run. No more error-messages like:


and:

This is what you’ll get

We’ll create a script which will:

  • disable xdebug
  • run your command
  • enable xdebug

the script we’ll name php-no-xdebug (or whatever you like)

With Xdebug (note the last line)


Without Xdebug (note the missing last line)

The script php-no-xdebug

Create the script /usr/local/bin/php-no-xdebug with the following contents.


and make it executable

That’s it! Run it like this:
>