I have the following simplified API:
http://localhost/app/apiA
http://localhost/app/apiB
where apiA
does some processing and then performs these simple operations so that apiA
calls apiB
:
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, site_url('apiB'));
//various other options
$response = curl_exec($curl);
Now I put a breakpoint in PhpStorm right on the curl_exec
call in apiA
and another right on the first line of the apiB
method. What happens is that, first of all, XDebug is stuck on the curl_exec
call and will remain there indefinitely; however if I press Break, stopping the interpreter, XDebug breaks but activates my breakpoint in apiB
!
I'd like it to perform the call to curl_exec
and hit the breakpoint in apiB
and then come back to the first breakpoint after it's completed. Is there any way to configure XDebug and/or PhpStorm to do this?
This is very simple to do in PhpStorm, simply go to Settings -> PHP -> Debug and in the External Connections section increase the value of the Max simultaneous connections to the number you require - in my case, 2 was enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With