[wp-trac] [WordPress Trac] #49953: Xdebug not working out of the box

WordPress Trac noreply at wordpress.org
Sun Apr 19 16:10:20 UTC 2020


#49953: Xdebug not working out of the box
------------------------------+-----------------------------
 Reporter:  Jules Colle       |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:  trunk
 Severity:  normal            |   Keywords:  needs-patch
  Focuses:                    |
------------------------------+-----------------------------
 This issue is regarding the [[https://github.com/WordPress/wordpress-
 develop|wordpress-develop repo on github]]

 I expected Xdebug to work out of the box after setting
 `LOCAL_PHP_XDEBUG=true` in the ''.env'' file, but that wasn't enough.

 It looks like I had to add a couple of lines to ''tools/local-env/php-
 config.ini'' as well:

 {{{
 xdebug.remote_enable=1
 xdebug.remote_connect_back=1
 }}}

 In my opinion, these lines should be added to php-config.ini by default.

 ---

 Additionally, I have a suggestion to also add some information on how to
 use Xdebug for WP core development with VS code, as it turns out you also
 need some custom configuration in the ''.vscode/launch.json'' file. I've
 written an article about this: https://bdwm.be/wordpress-core-development-
 with-xdebug-and-vs-code/

 Feel free to quote the article or include parts of it in the WP developer
 documentation.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49953>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list