[Feature Request]: Cannot use Xdebug when using BetterPHPUnit in VSCode #395
joshhanley
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
We'll discuss this as a feature request internally but it sounds like that makes sense, for example adding a "Use Xdebug permanently" option to this settings screen instead of changing php.ini files permanently. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Operating system version
macOS Sonoma 14.1.1
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.4.0 (Build: 20)
PHP Version
PHP 8.2.15 (cli) (built: Jan 19 2024 00:15:08) (NTS)
Bug description
Loving all the new Herd updates. Thanks to the team for all their great work! 😁
If you use an extension like BetterPHPUnit in VSCode, or even run a CLI tool like Pest, there is no way to use Xdebug as both use the symlinked PHP version which doesn't include the Xdebug config which gets dynamically added when using
herd debug
.I know I can manually copy the config from
Herd/config/php/XX/debug/debug.ini
and paste it into the mainHerd/config/php/XX/php.ini
but I prefer to keep the config in separate files if possible.It would be nice if there was a way to tell Herd to just include the Xdebug config by default for all requests. Or at least tell it to load all configs from a
Herd/config/php/XX/config/
directory, that way we could move thedebug.ini
into the directory if we want it to run all the time.Steps to reproduce
Set up Xdebug in VSCode and add a breakpoint in a Pest test.
Run test either using BetterPHPUnit extension or on the command line using
vendor/bin/pest
.Breakpoint isn't triggered.
If you run
php --ini
you can see that theHerd/config/php/XX/debug/debug.ini
config isn't loaded.It is specified in the documentation to use Xdebug in the CLI, to run
herd debug
but that isn't possible from tools that use PHP shell script type hint.Relevant log output
No response
Beta Was this translation helpful? Give feedback.
All reactions