xDebug enters a weird state - unable to debug

Hi,

for a couple of months i am struggling with issue that is completely strange, and have never occurred on any of my previous setups.

Whenever i run a PHP-debug call through rest-api built in service second time in a row, it kinda semi-stops at the first breakpoint. I can clearly see all the Debugger frames, Variable values, all buttons glow. but when it finishes the initialization, all the buttons like step over/into etc. goes grey again. I cannot even open the evaluate window to evaluate a random variable/expression, all i can click is to stop 'localhost' (the rest api call). If i want to make it work so i can debug like i usually do, i have to close PHPStorm and re-open it again so i can make a normal debug session, but only for one call, then it bugs this way again.

I checked the xdebug log, which does not show that unexpected behaviour. Basically it logs the start of the debug session and then the end of it (when i press stop). No errors as someone would expect somewhere between these lines. 
For me it looks like PHPStorm is for some reason loosing the connection with xdebug at the middle of the process.

I am now running Mac Catalina with PHP 7.2 | xDebug 3.0.4 | PHPStorm 2021.1.1, but it occurred even on older PHPStorm versions and xdebug versions.

If i can provide you with any other information, please LMK because im really getting frustrated by this.
Thanks :)

0

Ough, that's going to be a tough one to troubleshoot.

Just to get it out of the way - please try increasing the Max. simultaneous connections limit to something like 10, you can do that at Preferences | PHP | Debug.

Now, if it doesn't help, please describe your setup in a little bit more detail. The API call you're making, is it being served by the same web server and the same interpreter? I am trying to understand whether the Xdebug log is going to be the same for both the caller and the callee.

0
Avatar
Permanently deleted user

Max simultaneous connections are set to 10. Not sure if from default or i always set them to higher value.

The PHP server is hosted through PHPstorm via PHP built-in web server, and requests are done via PHP rest-service. Interpreter is the same

0

The default value is 3, so you must have modified it, but apparently, it didn't help.

As a test, could you please install MAMP and check if the issue is still there when you don't use the built-in web server?
If it is, please add #com.jetbrains.php to Help | Diagnostic Tools | Debug Log Settings, restart the IDE, purge the Xdebug log, and try to reproduce the issue making as little steps as possible to avoid the log littering.
Then, please upload the Xdebug log and idea.log here: https://uploads.services.jetbrains.com/

Thank you!

0
Avatar
Permanently deleted user

Sorry for a really late response, but i got it fixed. The only way to fix it was to update XDebug to 3.1.1. No other ways of fixing it

1

请先登录再写评论。