Possible to debug a POST made to a site from another site?

I have 2 projects which are both sites located on my local. 1 site posts to the other. Is it possible to debug the site which receives the post?

0
1 comment

Hi there,

Yes, it's possible. You have to either pass Xdebug's "debug me" flag with that POST request (Xdebug cookie or GET/POST parameter) or configure Xdebug to attempt to debug every single request regardless of "debug me" flag (xdebug.remote_autostart=1) -- nothing special here from IDE side -- standard Xdebug parameters.

The only thing: if you wish to debug both sites at the same time (i.e. you are debugging first site that makes such POST request (API call, lets say) to 2nd one .. which you also want to debug) .. then you will have to set max debug sessions to be 2 or more (by default it's just 1) -- just check Xdebug section in PhpStorm settings.

0

Please sign in to leave a comment.