Thanks for the report and screenshots, @tonicboy.
I’m not sure why PhpStorm is not intercepting requests in this case, but perhaps you could try using Xdebug without the Xdebug + PhpStorm add-on, its custom run configuration, or any adjustments to your Xdebug config:
- Create a fresh Local site using “Preferred” settings and enable the Xdebug switch in Local.
- Open the site’s
app/publicfolder in PhpStorm. (Not the site root folder above those.) - In PhpStorm, visit Settings → PHP → Debug, untick “Force break at first line when a script is outside the project” and click “Apply”.
- Set a breakpoint at the first define statement in
wp-config.php. - Now, instead of using the add-on to add a debug configuration, in PhpStorm just choose Run → Start Listening for PHP Debug Connections.
- Visit your site in any web browser. (You no longer have to start a debug session in PhpStorm to spawn a special debugging browser window.)
- You should see an “Incoming connection…” prompt in PhpStorm. Choose the
publicfolder and press Accept:
- PhpStorm should focus your breakpoint and suspend execution until you stop or skip in the debugger pane.
Choose Run → Stop Listening for PHP Debug Connections when you’re done debugging.
You’ll have to do this for each site you want to debug, but only once. Start subsequent debugging sessions just by choosing “Start Listening…” from the Run menu, setting a breakpoint and refreshing your browser.
I tested this with Local 7.0.2 on Intel and Apple Silicon Macs and it works consistently on both for me.
