Trigger xDebug in PhpStorm when calling using CURL

pillarOfLight picture pillarOfLight · Sep 24, 2013 · Viewed 13.3k times · Source

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?

Answer

wyxa picture wyxa · Sep 27, 2013

The following code works for me

curl -i -X POST -d '{"some":"data"}' http://your-local-domain -b XDEBUG_SESSION=PHPSTORM