windows xdebug - connection seems to break randomly

After starting a PHP debug session on my local Windows machine, I reach a breakpoint. There are some local variables visible in the right panel.

After 5 seconds of doing nothing, the variables suddenly disappear and there is a message "Variables are not available". Also, in the small red circle marking the breakpoint within the Editor window, the mini check mark disappears. In the debugger window, the "Resume Program" and "Stop" icons are still active.

At this point, sometimes hovering mouse over the "Variables" tab in the Debug window, or clicking on it, makes the variables come back, but not always. When they come back, it is sometimes only for a few seconds and then they disappear again. When they don't come back, pressing the "Step over" button displays a message "Waiting for incoming connection with ide key x" where "x" is the xdebug key visible in my web browser address bar. The web browser displays a big message that the site is not available at the moment, please try later.

At this point, the "Resume program" button is not active anymore, only "Stop". After presing "Stop" the message says "Disconnected".

This does not happen always, but often (today about 40% of the time, yesterday it happened only a few times).  Restarting PhpStorm doesn't improve the situation. I never had these kind of issues using Netbeans. How to deal with it ?

5 comments
Comment actions Permalink

Hello beamar,

Sorry for delay.

Please provide more details: Debug extension (Xdebug or Zend Debugger) and its version, PhpStorm version. If you use Xdebug, xdebug log (http://xdebug.org/docs/remote#remote_log) would be useful also.

Thank you for feedback!

0
Comment actions Permalink

I had XDebug version 2.1.0rc1

After updating to 2.1.2 the problem is not occurring anymore. If it happens again, I will update.

0
Comment actions Permalink

beamar,

Xdebug has a lot of issues with evaluation, so active using of watches can lead to the problem described above.
The most of the evaluation-related issue have been fixed in Xdebug 2.1.3 which will be released soon.

Thank you for feedback!
0
Comment actions Permalink

Having a similar issue now.... its not pretty...

2018-04-17 21:37:49,944 [ 468401] INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #com.jetbrains.php
2018-04-17 21:39:25,519 [ 563976] DEBUG - il.connection.ServerConnection - Incoming connection on port 9000 from 127.0.0.1
2018-04-17 21:39:25,532 [ 563989] DEBUG - .connection.PhpDebugConnection - 1261513763#----connection started
2018-04-17 21:39:25,567 [ 564024] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: com.jetbrains.php.util.pathmapper.PhpIdenticalPathMapper@63368ca1
2018-04-17 21:39:25,567 [ 564024] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: com.jetbrains.php.util.pathmapper.PhpIdenticalPathMapper@3fc33878
2018-04-17 21:39:25,568 [ 564025] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: com.jetbrains.php.util.pathmapper.PhpIdenticalPathMapper@36c04d20
2018-04-17 21:39:25,568 [ 564025] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: com.jetbrains.php.util.pathmapper.PhpIdenticalPathMapper@67657771
2018-04-17 21:39:25,572 [ 564029] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: com.jetbrains.php.util.pathmapper.PhpRemotePathMapper@2353ec96
2018-04-17 21:39:25,572 [ 564029] DEBUG - .php.run.filters.PhpUnitFilter - Path mapper: com.jetbrains.php.util.pathmapper.PhpRemotePathMapper@2353ec96
2018-04-17 21:39:25,572 [ 564029] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: com.jetbrains.php.util.pathmapper.PhpRemotePathMapper@2353ec96
2018-04-17 21:39:25,618 [ 564075] DEBUG - p.debug.common.PhpDebugProcess - 1319626557# Stop at ('file:///C:/wamp64/www/eponies/index.php':57)
2018-04-17 21:39:25,618 [ 564075] DEBUG - p.debug.common.PhpDebugProcess - 1319626557# remote: 'file:///C:/wamp64/www/eponies/index.php' <-> local: 'C:\wamp64\www\eponies\index.php'
2018-04-17 21:39:25,618 [ 564075] DEBUG - p.debug.common.PhpDebugProcess - 1319626557# remote: 'file:///C:/wamp64/www/eponies/index.php' <-> extracted: 'C:\wamp64\www\eponies\index.php'
2018-04-17 21:39:25,726 [ 564183] DEBUG - ommon.PhpSafeExpressionBuilder - $this;
2018-04-17 21:39:25,726 [ 564183] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $this-> (isset($this))?($this):"IDE_EVAL_ERR"
2018-04-17 21:39:25,727 [ 564184] DEBUG - ommon.PhpSafeExpressionBuilder - $this->horses[5];
2018-04-17 21:39:25,727 [ 564184] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $this->horses[5]-> (isset($this,$this->horses))?($this->horses[5]):"IDE_EVAL_ERR"
2018-04-17 21:39:25,727 [ 564184] DEBUG - ommon.PhpSafeExpressionBuilder - $this;
2018-04-17 21:39:25,727 [ 564184] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $this-> (isset($this))?($this):"IDE_EVAL_ERR"
2018-04-17 21:39:25,727 [ 564184] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['05bf4e22-4d78-4435-9449-de63a79287e9'];
2018-04-17 21:39:25,727 [ 564184] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['05bf4e22-4d78-4435-9449-de63a79287e9']-> (isset($GLOBALS))?($GLOBALS['IDE_EVAL_CACHE']['05bf4e22-4d78-4435-9449-de63a79287e9']):"IDE_EVAL_ERR"
2018-04-17 21:39:25,728 [ 564185] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->_topEntryHistoricBeyer;
2018-04-17 21:39:25,728 [ 564185] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->_topEntryHistoricBeyer-> (isset($GLOBALS,$GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->_topEntryHistoricBeyer))?($GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->_topEntryHistoricBeyer):"IDE_EVAL_ERR"
2018-04-17 21:39:25,728 [ 564185] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice;
2018-04-17 21:39:25,729 [ 564186] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice-> (isset($GLOBALS,$GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->))?($GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice):"IDE_EVAL_ERR"
2018-04-17 21:39:25,729 [ 564186] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['00cc172c-f6cc-4ff4-8be7-23735b067374'];
2018-04-17 21:39:25,729 [ 564186] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['00cc172c-f6cc-4ff4-8be7-23735b067374']-> (isset($GLOBALS))?($GLOBALS['IDE_EVAL_CACHE']['00cc172c-f6cc-4ff4-8be7-23735b067374']):"IDE_EVAL_ERR"
2018-04-17 21:39:25,729 [ 564186] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['4f2821fc-151b-4112-913e-a8596b977677'];
2018-04-17 21:39:25,730 [ 564187] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['4f2821fc-151b-4112-913e-a8596b977677']-> (isset($GLOBALS))?($GLOBALS['IDE_EVAL_CACHE']['4f2821fc-151b-4112-913e-a8596b977677']):"IDE_EVAL_ERR"
2018-04-17 21:39:25,730 [ 564187] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice;
2018-04-17 21:39:25,730 [ 564187] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice-> (isset($GLOBALS,$GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->))?($GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice):"IDE_EVAL_ERR"
2018-04-17 21:39:25,730 [ 564187] DEBUG - ommon.PhpSafeExpressionBuilder - $pastEntry->race->lowClaimingPrice;
2018-04-17 21:39:25,730 [ 564187] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $pastEntry->race->lowClaimingPrice-> (isset($pastEntry,$pastEntry->race,$pastEntry->race->lowClaimingPrice))?($pastEntry->race->lowClaimingPrice):"IDE_EVAL_ERR"
2018-04-17 21:39:25,730 [ 564187] DEBUG - ommon.PhpSafeExpressionBuilder - $pastEntry->race->lowClaimingPrice;
2018-04-17 21:39:25,731 [ 564188] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $pastEntry->race->lowClaimingPrice-> (isset($pastEntry,$pastEntry->race,$pastEntry->race->lowClaimingPrice))?($pastEntry->race->lowClaimingPrice):"IDE_EVAL_ERR"
2018-04-17 21:39:25,731 [ 564188] DEBUG - ommon.PhpSafeExpressionBuilder - $this->horses[5];
2018-04-17 21:39:25,731 [ 564188] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $this->horses[5]-> (isset($this,$this->horses))?($this->horses[5]):"IDE_EVAL_ERR"
2018-04-17 21:39:28,744 [ 567201] DEBUG - p.debug.common.PhpDebugProcess - 1319626557# Stop at ('file:///C:/wamp64/www/eponies/index.php':110)
2018-04-17 21:39:28,744 [ 567201] DEBUG - p.debug.common.PhpDebugProcess - 1319626557# remote: 'file:///C:/wamp64/www/eponies/index.php' <-> local: 'C:\wamp64\www\eponies\index.php'
2018-04-17 21:39:28,744 [ 567201] DEBUG - p.debug.common.PhpDebugProcess - 1319626557# remote: 'file:///C:/wamp64/www/eponies/index.php' <-> extracted: 'C:\wamp64\www\eponies\index.php'
2018-04-17 21:39:28,751 [ 567208] DEBUG - ommon.PhpSafeExpressionBuilder - $this;
2018-04-17 21:39:28,751 [ 567208] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $this-> (isset($this))?($this):"IDE_EVAL_ERR"
2018-04-17 21:39:28,751 [ 567208] DEBUG - ommon.PhpSafeExpressionBuilder - $this->horses[5];
2018-04-17 21:39:28,751 [ 567208] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $this->horses[5]-> (isset($this,$this->horses))?($this->horses[5]):"IDE_EVAL_ERR"
2018-04-17 21:39:28,752 [ 567209] DEBUG - ommon.PhpSafeExpressionBuilder - $this;
2018-04-17 21:39:28,752 [ 567209] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $this-> (isset($this))?($this):"IDE_EVAL_ERR"
2018-04-17 21:39:28,752 [ 567209] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['05bf4e22-4d78-4435-9449-de63a79287e9'];
2018-04-17 21:39:28,752 [ 567209] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['05bf4e22-4d78-4435-9449-de63a79287e9']-> (isset($GLOBALS))?($GLOBALS['IDE_EVAL_CACHE']['05bf4e22-4d78-4435-9449-de63a79287e9']):"IDE_EVAL_ERR"
2018-04-17 21:39:28,752 [ 567209] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->_topEntryHistoricBeyer;
2018-04-17 21:39:28,752 [ 567209] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->_topEntryHistoricBeyer-> (isset($GLOBALS,$GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->_topEntryHistoricBeyer))?($GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->_topEntryHistoricBeyer):"IDE_EVAL_ERR"
2018-04-17 21:39:28,753 [ 567210] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice;
2018-04-17 21:39:28,753 [ 567210] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice-> (isset($GLOBALS,$GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->))?($GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice):"IDE_EVAL_ERR"
2018-04-17 21:39:28,753 [ 567210] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['00cc172c-f6cc-4ff4-8be7-23735b067374'];
2018-04-17 21:39:28,753 [ 567210] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['00cc172c-f6cc-4ff4-8be7-23735b067374']-> (isset($GLOBALS))?($GLOBALS['IDE_EVAL_CACHE']['00cc172c-f6cc-4ff4-8be7-23735b067374']):"IDE_EVAL_ERR"
2018-04-17 21:39:28,753 [ 567210] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['4f2821fc-151b-4112-913e-a8596b977677'];
2018-04-17 21:39:28,753 [ 567210] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['4f2821fc-151b-4112-913e-a8596b977677']-> (isset($GLOBALS))?($GLOBALS['IDE_EVAL_CACHE']['4f2821fc-151b-4112-913e-a8596b977677']):"IDE_EVAL_ERR"
2018-04-17 21:39:28,753 [ 567210] DEBUG - ommon.PhpSafeExpressionBuilder - $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice;
2018-04-17 21:39:28,754 [ 567211] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice-> (isset($GLOBALS,$GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->))?($GLOBALS['IDE_EVAL_CACHE']['81460271-3dd5-4bf8-8308-684cdba89382']->*project\model\horse*auctionPrice):"IDE_EVAL_ERR"
2018-04-17 21:39:28,754 [ 567211] DEBUG - ommon.PhpSafeExpressionBuilder - $pastEntry->race->lowClaimingPrice;
2018-04-17 21:39:28,754 [ 567211] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $pastEntry->race->lowClaimingPrice-> (isset($pastEntry,$pastEntry->race,$pastEntry->race->lowClaimingPrice))?($pastEntry->race->lowClaimingPrice):"IDE_EVAL_ERR"
2018-04-17 21:39:28,754 [ 567211] DEBUG - ommon.PhpSafeExpressionBuilder - $pastEntry->race->lowClaimingPrice;
2018-04-17 21:39:28,754 [ 567211] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $pastEntry->race->lowClaimingPrice-> (isset($pastEntry,$pastEntry->race,$pastEntry->race->lowClaimingPrice))?($pastEntry->race->lowClaimingPrice):"IDE_EVAL_ERR"
2018-04-17 21:39:28,754 [ 567211] DEBUG - ommon.PhpSafeExpressionBuilder - $this->horses[5];
2018-04-17 21:39:28,754 [ 567211] DEBUG - .php.debug.common.PhpEvaluator - evaluate: $this->horses[5]-> (isset($this,$this->horses))?($this->horses[5]):"IDE_EVAL_ERR"
2018-04-17 21:39:30,012 [ 568469] DEBUG - .connection.PhpDebugConnection - 1261513763#---input stream is finished
2018-04-17 21:39:30,012 [ 568469] DEBUG - .connection.PhpDebugConnection - 1261513763#---stop writing
2018-04-17 21:39:30,012 [ 568469] DEBUG - .connection.PhpDebugConnection - 1261513763#----connection stopped
2018-04-17 21:39:30,012 [ 568469] DEBUG - .connection.PhpDebugConnection - 1261513763#---stop reading
2018-04-17 21:39:30,012 [ 568469] DEBUG - il.connection.ServerConnection - ----socket closed
2018-04-17 21:40:56,101 [ 654558] INFO - ide.actions.ShowFilePathAction -

0
Comment actions Permalink

The IDE log is not really helpful in such cases, we need to know what's happening on the Xdebug side.
Please enable Xdebug remote log: https://intellij-support.jetbrains.com/hc/en-us/articles/206544819-How-to-collect-remote-log-for-XDebug
And upload it somewhere after the issue happens again.

0

Please sign in to leave a comment.