We know how important xdebug in php is .. no post on that 🙂
when it is through the url, we will use the
XDEBUG_SESSION_START=somevariable
But, when you are using curl or some other client for using a post, cookie is a rescue
CURL_COOKIE = 'XDEBUG_SESSION=somevariable'
Just add the above as one of the curl options and you should be good.