简体   繁体   中英

Debugging stuck on PhpStorm

The debugging is not working anymore on any of my PhpStorm project, when I start listening to incoming connection the script is blocked until I stop to listen to connections, even if I have no breakpoints on my code. And when I put a breakpoint on the first line (it's not working on others lines), the script is indeed stopped, but when I tell him to go to next line it block again (even with the simplest code possible).

I tried to check the debug configuration everything is ok (I used the validator from PhpStorm), the path mapping is also ok, well last week everything worked fine and I changed nothing so ...

Here is my configuration on my php.ini :

xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_log=[path]/xdebug.log
xdebug.idekey=PHPSTORM

And here are some part of my xdebug.log when i put a breakpoint on first line then do a step over :

[4605] Log opened at 2019-03-12 14:13:50
[4605] I: Connecting to configured address/port: 127.0.0.1:9000.
[4605] I: Connected to client. :-)
[...]
[4605] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="19" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" [...] </property></response>
[...]
[4605] <- step_over -i 21
[4605] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_over" transaction_id="21" status="break" reason="ok"><xdebug:message filename="file:///[path]" lineno="4"></xdebug:message></response>
[4605]

The first response is when it stopped on the breakpoint on the first line, I have everything working fine with variables as "$_COOKIE" logged, then I do the step over, and the script is like stuck. And the problem can't be in the code, I tried with a script with only 2 "echo". I tried to restart apache, I tried to restart PhpStorm, and I tried to restart my computer, nothing changed.

My PhpStorm version :

PhpStorm 2018.1
Build #PS-181.4203.565, built on March 28, 2018
JRE: 1.8.0_152-release-1136-b20 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-102-generic

My php version :

PHP 7.1.27-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar  7 2019 20:02:03) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.27-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.0, Copyright (c) 2002-2019, by Derick Rethans

Do you have any idea of what is hapening ? (it seems my php version was built last week, maybe it's linked ...)

I found the answer, it's a non compatibility between phpstorm 2018.1 and Xdebug 2.7.0, as it was signaled on this xdebug bug report : https://bugs.xdebug.org/view.php?id=1637

I upgraded phpstorm to the version 2018.3, and now everything is fine.

I've been running into the same issue this morning. I believe one of the latest updates to Xdebug (which was officially updated ~6 days ago?) might have broken the build for PHP 7.1.x. I uninstalled the current xdebug version and used a cached version that I had locally inside the apt cache. I think LazyOne might be onto the right track with Xdebug 2.6.1 being the version we need.

Cached packages available here (on ubuntu): /var/cache/apt/archives/

Listed and grepped for xdebug - which listed an older cached package that included 2.6.1.

cd /var/cache/apt/archives/

ll | grep xdebug

And installed the older package using sudo dpkg -i packagename where packagename was the previous version I had cached.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM