xDebug: Debug Client (uses CURL) and Server at the same time

Hello,

I've the situation where I've server and a client script, both written in PHP. The server is currently running on a VHost on my Mac (powered by MAMP) and the client is run via terminal with a simple php client.php. Both of them have their own PhpStorm project that I would like to debug at the same time - add breakpoint in each one in order to understand whats happening.

Both projects share the same php.ini with the following config:

The cli client.php, using CURL, calls the server.php via its local address http://abc.test/server.php. When I run php client.php on the Terminal PhpStorm asks me to choose a project to handle the debug connection:

 If I set a breakpoint on my client project, it works as expected / stops at the breakpoint.

The problem: I never get a second popup asking to pick a project from the Server debug connection. Since I'm setting xdebug.remote_autostart = On shouldn't this happen?

As described in other posts, I tried to change some configs on PhpStorm (for both projects) but it still doesn't work:


How can I debug my server and the client at the same time?

Thank you.

1 comment
Comment actions Permalink

Just forget it. Apparently my configuration works, it was just a problem with my CURL call.

0

Please sign in to leave a comment.