Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xdebug is always resetting session with phpStorm

Ether my status never came cross before or I don't know how to google it! my development environment got updated to ubuntu 14.04, phpStorm 2016.1 (still in trial version), java version "1.7.0_95". all settings are fine and I can debug, but after debugging start (a bout a minute or less), all debugging session gets terminates OR restarts from the first break point. also I get a lot of "Debug Session was finished without being paused" notice without making any debug request (see attached plz).

enter image description here

please let me know what to check or what could be the reason. Thanks in advance.


Update :

following is xdebug settings in php.ini

[xdebug] 
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1

development framework is magento 1.14.2 EE

like image 627
rramiii Avatar asked Apr 11 '16 08:04

rramiii


2 Answers

You have the remote_autostart turned on, so every time you reload the page xDebug tries to debug the script, even if you weren't meaning to.

According to the documentation

When this setting is set to 1, Xdebug will always attempt to start a remote debugging session and try to connect to a client, even if the GET/POST/COOKIE variable was not present.

Set xdebug.remote_autostart = 0 and that should stop the errant messages about debugging.

like image 129
Thornview Avatar answered Sep 18 '22 21:09

Thornview


I'll quote a clear response from the official forums

You are right it's fine to have debug session without any breakpoints reached, e.g. it's common if you have Ajax request. The warning is intend to help new users to configure debugger. If "Break at first line" option is disabled and there's some error that silently prevent you to setup breakpoints (e.g. there's a typo in path mappings at PHP|Servers, remote and local file versions are not synchronized, etc) then nothing will happen on page reload. This situation is indistinguishable from xdebug misconfiguration (e.g. wrong "xdebug.remote_host", "xdebug.remote_port") therefore you may spend a lot of time to figure out the problem. The message is saying that debugger itself is configured correctly and suggest you next step in troubleshooting process.

If you have no problem and debug session without breakpoints is expected behavior then just disable it

like image 38
Laurent Avatar answered Sep 19 '22 21:09

Laurent