Jump to content

disable xdebug without uninstall


Recommended Posts

$ apt show php-xdebug | head -n 2
Package: php-xdebug
Version: 3.1.2+2.9.8+2.8.1+2.5.5-4

OK, xdebug is installed.

But

$ php -d xdebug.mode=off -r "xdebug_var_dump(123);"
int(123)

Strange that it works (to notice xdebug.mode=off). I was expecting something like this

Call to undefined function xdebug_var_dump()

 

Link to comment
Share on other sites

Posted (edited)

And to avoid loading the extension?

There are those who suggest giving the command

$ phpdismod xdebug
	


There are those who suggest (for those like me who have Ubuntu 22.04.4) to open the file /etc/php/8.1/cli/conf.d/20-xdebug.ini and comment the line

;zend_extension=xdebug.so
	


 

inserting ';' at the beginning

And there are those who suggest other oddities, that I don't want to implement so as not to cause damage.

Everyone has their say, but what is the correct, safe and official method?
 

Edited by rick645
Link to comment
Share on other sites

For certain needs I want to use it; for others not. Instead of uninstalling and reinstalling it, I wanted to know if there is a way to turn it off, or rather, among those I proposed, which is the most correct one (or if both are equivalent).

Nothing more, nothing lessexit!!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.