so I use CURL from the command line to make calls to my PHP website:
curl -s "url"
My question is...is it possible to modify this command so that I can trigger xDebug (combined with an IDE (I use Jetbrains PHPStorm)) when calling the site from CURL
perhaps manipulate the GET variables?
Enable Xdebug logging by adding the following line into php. ini: xdebug. remote_log=/log_path/xdebug.
The following code works for me
curl -i -X POST -d '{"some":"data"}' http://your-local-domain -b XDEBUG_SESSION=PHPSTORM
I was still having trouble until I added path=/
to the cookie in addition to wyxa's answer.
curl --cookie "XDEBUG_SESSION=PHPSTORM;path=/;" localhost
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With