Personally I let the call run in debug mode in my IDE.
I use Netbeans (others are available).
I run the program in debug mode. That starts another instance of my site, but that doesn't matter.
I then make the call. I use a plugin to FireFox, but it should be just the same with curl.
I put breakpoints where I want/need and watch values and code to see what's going on.
This requires running a webserver on the machine I'm debugging on. This seems to be the point at which a lot of people throw up their hands in horror, but it's really not very hard.