2

Actually, with the new release of Xdebug 3, I have to investigate more why its not working. I don't have much time for that.

The problem was I had this command for vagrant box creation but it does not have any version number.

sudo apt-get install -y php-xdebug

Is there a way to specify the version number to install version 2.9.3

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Mohsin Younas
  • 324
  • 4
  • 12
  • 1
    If you use pecl .. then you can use `pecl install xdebug-2.9.3`. For your apt-get you may try `sudo apt-get install =` syntax, for example: `sudo apt-get install xdebug=2.9.8` P.S. Why do you need 2.9.3 when latest stable for v2 is 2.9.8? – LazyOne Feb 21 '21 at 17:02
  • thank you. I will get back to answer in some time. sorry, extremely busy . :-( :-) Thank you so much for taking time to answer. – Mohsin Younas Feb 24 '21 at 11:33
  • 3
    Xdebug 3 is most likely not working because they have changed/removed a lot of their options. E.g. instead of `xdebug.remote_enable=1`, use `xdebug.mode=debug`. They have also changed the default port from 9000 to 9003, so to keep it at 9000, also use `xdebug.client_port=9000`. More info: https://xdebug.org/docs/upgrade_guide – Smithee Jun 02 '21 at 09:22

1 Answers1

1

this worked for me. Thank you @LazyOne for help. :-)

sudo apt-get install -y php-pear php7.3-dev
sudo apt install -y php7.3-xdebug
sudo pecl install xdebug-2.9.3
Mohsin Younas
  • 324
  • 4
  • 12
  • Doesn't work in 2022: `#0 0.549 E: Unable to locate package php7.3-xdebug #0 0.549 E: Couldn't find any package by glob 'php7.3-xdebug'` – geoidesic Dec 10 '22 at 11:17