I am using the PHP CLI binary of MAMP (ie. /Applications/MAMP/bin/php/php7.2.10/bin/php) to execute scripts from the Terminal. How can I use Xdebug to step thru a script that I execute this way?
So far I have read: https://joshbuchea.com/mac-enable-xdebug-in-mamp/ Getting Xdebug Working with MAMP and Mac which mentions how to enable xdebug but only through calling the script from a web server.
And this: Installing Xdebug for PHP CLI Which is on Xdebug with XAMPP which I unfortunately find difficult to extrapolate to MAMP.
Is there not a simple way like:
$ phpdebugger phpfile.php
( Instead of
$ php phpfile.php
)
Which will just start the debugging session with the file?
If xdebug is not suitable for this, is there another program to do this?