rick645 Posted May 24 Share Posted May 24 $ 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() Quote Link to comment Share on other sites More sharing options...
requinix Posted May 24 Share Posted May 24 The extension still gets loaded and functions will still exist. Changing the xdebug.mode merely tells Xdebug not to do anything. https://xdebug.org/docs/all_settings#mode Quote Link to comment Share on other sites More sharing options...
rick645 Posted May 27 Author Share Posted May 27 (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 May 27 by rick645 Quote Link to comment Share on other sites More sharing options...
requinix Posted May 27 Share Posted May 27 If you don't want to use the extension then don't install it 😕 Quote Link to comment Share on other sites More sharing options...
rick645 Posted May 27 Author Share Posted May 27 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!!! Quote Link to comment Share on other sites More sharing options...
requinix Posted May 27 Share Posted May 27 Yes: xdebug.mode = off. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.