Xdebug 3.0.0

Hi, when is the included xdebug 2.9.0 going to be updated to the recently released 3.0.0 (Nov. 25, 2020)? Version 3 offers several significant performance improvements to the debugging experience.

2 Likes

Just wanted to let you know that PhpStorm 2020.3 does not work with Xdebug < v2.9.6, see https://youtrack.jetbrains.com/issue/WI-57282.
While this issue will be fixed in 2020.3.1, Local should definitely update Xdebug, at least to the latest v2.* version, which is v2.9.8 as of time of writing, see https://xdebug.org/announcements/2020-09-28.

1 Like

xDebug is now at 3.0.1 and Local Beta is testing PHP 8 with xDebug 3.0. It’s probably time to consider updating the other PHP lightning services to use xDebug 3.x. This should now be more painless with the lightning services updater :wink:

Working default settings for xDebug 3.x and Local can be found here, Install PHP 8

It would require updates to have xDebug 3.x listening on port 9003 for any add-ons that set these values.

3 Likes

I don’t have an eta on when this will be worked on, but I have put it on our development radar!

1 Like

I’m not sure what the difficulty is in updating the default configuration in LocalWP but I was able to determine a workaround based on how I observed the settings changed when moving between PHP 7 and 8 for my site in LocalWP.

Here’s my workaround to backport xdebug 3 to PHP 7.4:

  1. Download the latest php_xdebug DLL that matches the PHP version running for the site in LocalWP from Xdebug: Downloads
    In my case on a Windows OS it was to download this one PHP 7.4 VC15 (64 bit)
  2. Copy that DLL into the Local lightning-services folder for the respective PHP version (e.g. %APPDATA%\Local\lightning-services\php-7.4.1+14\bin\win64\ext
  3. For simplicity, I renamed the downloaded DLL to php_xdebug3.dll
  4. Edit the LocalWP site’s php.ini.hbs config file’s [xdebug] section with the following (I kept the old xdebug settings in {{!-- --}} comment blocks just in case I want to go back to the built-in xdebug v2:
{{!--
[xdebug]
{{#if os.windows}}
zend_extension = php_xdebug.dll
{{else}}
zend_extension = {{extensionsDir}}/xdebug.so
{{/if}}

xdebug.remote_enable=1
xdebug.remote_connect_back=Off
xdebug.remote_port="9000"
xdebug.profiler_enable=0
--}}

[xdebug]
{{#if os.windows}}
zend_extension = php_xdebug3.dll
{{else}}
zend_extension = {{extensionsDir}}/xdebug.so
{{/if}}

xdebug.mode=debug
xdebug.client_port="9000"
xdebug.start_with_request=yes
xdebug.discover_client_host=yes
  1. Restart your LocalWP site and confirm the upgrade by visiting your PHP info page (/local-phpinfo.php):

3 Likes

Great!
It is working,just the location of the file is:

%APPDATA%\Roaming\Local\lightning-services\php-7.4.1+14\bin\win64\ext

Thank you!

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.