WordPress and Xdebug (yet again)

I've never seen a definitive, straightforward, and consistent answer to this, so…

  • I want to use xdebug to debug php code in Wordpress.
  • I want to not have PHPStorm open a debugger panel on every wp-cron or admin-ajax call, which just keep running constantly.
  • I want to only break where I set breakpoints.
  • I want to break on any breakpoint I set, without having to set up a path mapping for every file I want to debug.
  • I want to use the Firefox xdebug helper, to trigger the session when I load the webpage.

I've tried every combination I can think of, of server setup, path mapping, and so on, and can't get a configuration that works completely. Either I have to path map every file, or put up with the ajax/cron mess, or I get confused and everything just fails.

This all “just works” in VSCode. I install the xdebug extension, it creates a “launch.json” file which I only have to edit a little bit, and everything happens just as expected. But I don't want to have to use VSCode, just to be able to develop for Wordpress. PHPStorm is better, in my view. But in this one regard, it drives me bonkers.

Can anyone please provide a clear recipe for this? Thanks.

Oh, deets: I develop using ddev running on orbstack (on a Mac), so the local sites are running docker containers, at URLs like “https://zowie.com.ddev.site”. Nothing too exotic.

 

0

请先登录再写评论。