Closed BronsonQuick closed 3 years ago
I just got Xdebug 3 working on my local (non-Chassis) installation. I had to tweak the config after reading through https://github.com/felixfbecker/vscode-php-debug/issues/411 so it would connect to VS Code.
xdebug.mode=debug;
xdebug.client_port = 9000
xdebug.start_with_request = yes
xdebug.discover_client_host = true
Xdebug 3 switched its default port from 9000 to 9003, so I switched it back in order to not have to change the VS Code configuration.
@johnbillion Ahh nice work Sir. I did see they changed port numbers. The port is configurable in Chassis.
I had a bit of a play around with this last night but didn't get too far. The documentation states that the PPA I'm using should work if I installed packages as follows: php74-xdebug
but those weren't working. I didn't get a chance to try using PECL to install Xdebug instead. I'm keen to know how you installed it in your non-Chassis installation if you don't mind letting me know please? If it was PECL then I am in two minds as to whether I refactor this extension or if I write a new xdebug3
extension.
@BronsonQuick I posted about this internally at HM, here's the trimmed down version:
This configuration will put Xdebug into debug mode, which enables breakpoint debugging. I’ve tested this with the PHP Debug extension for VS Code and it’s working nicely.
xdebug.mode = debug;
xdebug.discover_client_host = true
xdebug.start_with_request = yes
xdebug.client_port = 9000
Note that I’ve switched the port to 9000 so I don’t need to change the existing configuration in my editor.
vagrant ssh
sudo apt-get update
sudo apt-get install php-xdebug
cd /etc/php/<PHPVERSION>/fpm/conf.d/
xdebug.ini
file and add the configuration that I’ve listed abovesudo service php<PHPVERSION>-fpm restart
pecl clear-cache
pecl install xdebug
/usr/local/etc/php/<PHPVERSION>/php.ini
valet restart php
@johnbillion Champion. Thank you so much Sir! 🤗
Turns out my refactor was installing the new versions of Xdebug but I hadn't read about all the changes in the upgrade guide so your minimum config got me back on track and I've hunted down all the new changes 👯 Time for a PR then some PHP version testing!
What operating system do you use?
What version of Vagrant are you running?
Are you using VirtualBox or VMWare and which version are you using?
Do you have a custom YAML file? If so, what does it contain? (Please paste in your
chassis.local.yaml
file)Do you have any Chassis other extensions installed? If so, what are they?