Chassis / Xdebug

A Chassis extension to install and configure Xdebug on your server
0 stars 8 forks source link

Test support for Xdebug 3 #63

Closed BronsonQuick closed 3 years ago

BronsonQuick commented 3 years ago
  1. What operating system do you use?

  2. What version of Vagrant are you running?

  3. Are you using VirtualBox or VMWare and which version are you using?

  4. Do you have a custom YAML file? If so, what does it contain? (Please paste in your chassis.local.yaml file)

  5. Do you have any Chassis other extensions installed? If so, what are they?

johnbillion commented 3 years ago
  1. macOS 10.15.6
  2. Vagrant 2.2.9
  3. Virtualbox 6.1.8
  4. Yes but just paths and database credentials
  5. Extensions:
    • chassis/xdebug
    • chassis/sequelpro
    • chassis/mailhog
    • chassis/npm
    • chassis/chassis-openssl
    • shadyvb/chassis-redis
    • chassis/chassis_elasticsearch
johnbillion commented 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.

BronsonQuick commented 3 years ago

@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.

johnbillion commented 3 years ago

@BronsonQuick I posted about this internally at HM, here's the trimmed down version:

Minimum Configuration

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.

Chassis

Homebrew or Laravel Valet

BronsonQuick commented 3 years ago

@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!