PHPUnit Freezes on startup with xdebug active and listening

I am struggling yesterday with a completely strange problem that comes out of nowhere. I am working with PHPStorm in a Symfony project. PHPUnit tests work as usual. If I activate listening mode in the IDE for debugger connections and run tests, phpunit freezes and the IDE automatically stops after 30 seconds. I think this has nothing to do with the idea. If I use MacGDBp, I experience the same thing. I checked all the firewall related things on my OSX 10.11 and installed php in the new Brew environment. PHP is version 5.6 from local OSX and Brew.

I don’t see blind people without a debugger: -o

+5
source share
2 answers

Make sure there is no other debugging session in the background.

0
source

Xdebug can only listen on one running PHP process at a time. There are usually two possibilities for this.

1) As @adrianGW says, there may be another process already connected to the debugger.

2) Your program is trying to load another PHP process, and this process cannot start until xdebug releases the current thread. It is well known that PHPunit will run tests in its threads so that they do not spoil each other. Or you make an http request in your php script application on the same server, and this second request is waiting for the first to complete so that you are blocked until the first script ou times

There are two errors in PHPstorm:

1) You can change Max Simultaneous Conections to a number greater than 1

2) You can enable Ignore external connections through unregistered servers configurations , but this will only work if the reason for the additional flows is something like a request to another domain on the same server, which xdebug can distinguish as an unregistered server.

0
source

Source: https://habr.com/ru/post/1234086/


All Articles