Closed renzocastillo closed 1 month ago
We are currently talking with JetBrains about adding a Herd detection into PHPStorm to make this easier 🎉
I have the exact same issue with PhpStorm and I use Herd Pro, would be nice to get this working
@renzocastillo your script works great! i added a raycast script command just like you did to toggle so I can debug my tests in PHPStorm.
@mpociot look forward to news regarding the direct detection. Thank you.
In the meantime you can configure a custom "debug" interpreter in PHPStorm to use for CLI commands.
Platform
macOS
Operating system version
MacOS Sonoma 14.5
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.7.8 Build(28)
PHP Version
PHP 8.1.29
Bug description
When I try to debug a PHPUnit test, Herd doesn't capture the breakpoints I establish in my source code. However, it does capture them when I run my Laravel application using the web browser with the debugging tool. I frequently use CLI debugging for test-driven development to verify my application's functionality.
https://github.com/beyondcode/herd-community/assets/21372177/4518f2c2-ffb6-4671-82d4-338e272b9301
Steps to reproduce
Make sure you have properly set up Xdebug with PHPStorm
Open any test file at your source code using PhpStorm
Workaround solution:
So, for this reason, I checked Herd PHP configuration and found this debug.ini file
Main PHP ini file contains:
Debug ini file contains:
So I know currently have a bash script which basically adds all content from debug.ini into php.ini
So now I do this to be able to test through cli:
https://github.com/beyondcode/herd-community/assets/21372177/40a6604c-a837-42a5-9841-42f34f68e21c
It would be nice to have Herd handling this out of the box. I've followed the instructions stated here.
Maybe we could add a checkbox here to manually enable Xdebug by clicking it or using a keyboard shortcut. This would be useful for debugging scenarios in the command line interface.
I appreciate your help and thank you for building this cool product.
Relevant log output
No response