xdebug session continues some time after hitting breakpoint

After a minute or 2 stopped at breakpoint, debug session continues without any user input. The process completes as if the continue button was pressed, without stopping at any other breakpoints.

7 comments

Hi there,

No idea. I mean -- PHP process would usually be just terminated in my experience.

What do you debug -- a CLI script or a web page? If web page -- what server it is (Apache etc)?

Usually web server has a time limit on how long the interpreters can run the script or does not receive any output (which is the case when you debugging and not executing any statements that produce output). 2 minutes sounds about the default setting.

As far as I'm concerned it's purely webserver/PHP interaction config. I'm using IIS .. and it's easy to configure (once you know where). No solid idea about other web servers/php-fpm... but look for XXXtimeout kind of config options.

 

P.S. That's how I'm fixing tmeout for IIS (attachment in the very last comment): https://intellij-support.jetbrains.com/hc/en-us/community/posts/206378019/comments/207477989

0

Yes it's weird, happens every time. Both CLI and web. Stop on a breakpoint, wait a minute or 2, the debug session closes and the process completes.

I'm using docker-for-mac, php-fpm... Not a php config issue as far as I can tell, that hasn't changed. And the "timeout" is random amount 30-150 seconds or so. Tried 2017.3.2, 2017.3.1, 2017.2.4

0

If it happens for CLI as well .. then I absolutely have no clue (but then .. you are using Docker). I can debug my local CLI script as much as I want (Windows 10; nts 32-bit PHP builds) -- once I left it for over 1 hour and it still could resume later.

Sorry, not better suggestions .. but I doubt it's an issue from IDE side (no idea why it would need to have such "feature").

BTW -- try enabling xdebug log and see what it may say there -- maybe it will give some hints.

0

thanks for your help -- downgrading docker-for-mac fixes so I've filed an issue there: https://github.com/docker/for-mac/issues/2421

0

I am now seeing this using PHPStorm2018.1.  I have tried to time the "stopped" interval, but it seems to vary from as little as a few seconds to [sometimes] up to 4 to 5 minutes.  The system's behavior is as described above--it is as though the continue button has been pressed.

I am running on an Ubuntu Linux box [16.04] with 4 GB of RAM, PHP 7.15, and Xdebug 2.6.0

 

Wyckham Seelig

0

Try enabling xdebug logs and check if there are any clues

0

Don't know if this helps or not, but here is what I'm getting.  At the top we see several normal breakpoint stops at
line 988 in rules.core.inc.  Then, at 11:23:07 we get "input stream is finished" "stop writing", "connection stopped",
and "stop reading" messages.  Then several "--socket closed" messages, and then it looks like the socket is
reconnected and execution proceeds.  I had not clicked the continue button to make this happen, it was,
as far as I can tell, spontaneous behavior by PHPStorm.


2018-05-18 11:13:10,084 [ 661323] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# Stop at ('file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc':988)
2018-05-18 11:13:10,085 [ 661324] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> local: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:13:10,085 [ 661324] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> extracted: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:16:32,995 [ 864234] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# Stop at ('file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc':988)
2018-05-18 11:16:32,995 [ 864234] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> local: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:16:32,995 [ 864234] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> extracted: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:17:56,680 [ 947919] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# Stop at ('file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc':988)
2018-05-18 11:17:56,681 [ 947920] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> local: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:17:56,681 [ 947920] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> extracted: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:21:15,473 [1146712] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# Stop at ('file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc':2,434)
2018-05-18 11:21:15,473 [1146712] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> local: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:21:15,473 [1146712] DEBUG - p.debug.common.PhpDebugProcess - 1352230906# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> extracted: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:23:07,426 [1258665] DEBUG - .connection.PhpDebugConnection - 1271137029#---input stream is finished
2018-05-18 11:23:07,426 [1258665] DEBUG - .connection.PhpDebugConnection - 1271137029#---stop writing
2018-05-18 11:23:07,427 [1258666] DEBUG - .connection.PhpDebugConnection - 1271137029#----connection stopped
2018-05-18 11:23:07,426 [1258665] DEBUG - .connection.PhpDebugConnection - 1271137029#---stop reading
2018-05-18 11:23:07,429 [1258668] DEBUG - il.connection.ServerConnection - ----socket closed
2018-05-18 11:23:07,480 [1258719] DEBUG - il.connection.ServerConnection - Incoming connection on port 9000 from 127.0.0.1
2018-05-18 11:23:07,482 [1258721] DEBUG - .connection.PhpDebugConnection - 1446802563#----connection started
2018-05-18 11:23:07,559 [1258798] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]f
2018-05-18 11:23:07,559 [1258798] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]2
2018-05-18 11:23:07,560 [1258799] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]e
2018-05-18 11:23:07,560 [1258799] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]0
2018-05-18 11:23:07,567 [1258806] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:07,567 [1258806] DEBUG - .php.run.filters.PhpUnitFilter - Path mapper: [email protected]
2018-05-18 11:23:07,567 [1258806] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:07,696 [1258935] DEBUG - .connection.PhpDebugConnection - 1446802563#---input stream is finished
2018-05-18 11:23:07,696 [1258935] DEBUG - .connection.PhpDebugConnection - 1446802563#---stop writing
2018-05-18 11:23:07,696 [1258935] DEBUG - .connection.PhpDebugConnection - 1446802563#---stop reading
2018-05-18 11:23:07,696 [1258935] DEBUG - .connection.PhpDebugConnection - 1446802563#----connection stopped
2018-05-18 11:23:07,697 [1258936] DEBUG - il.connection.ServerConnection - ----socket closed
2018-05-18 11:23:07,730 [1258969] DEBUG - il.connection.ServerConnection - Incoming connection on port 9000 from 127.0.0.1
2018-05-18 11:23:07,732 [1258971] DEBUG - .connection.PhpDebugConnection - 1172895368#----connection started
2018-05-18 11:23:07,810 [1259049] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:07,810 [1259049] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]221ca
2018-05-18 11:23:07,811 [1259050] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]7
2018-05-18 11:23:07,811 [1259050] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:07,816 [1259055] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:07,816 [1259055] DEBUG - .php.run.filters.PhpUnitFilter - Path mapper: [email protected]
2018-05-18 11:23:07,816 [1259055] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:08,022 [1259261] DEBUG - p.debug.common.PhpDebugProcess - 255956587# Stop at ('file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc':2,434)
2018-05-18 11:23:08,023 [1259262] DEBUG - p.debug.common.PhpDebugProcess - 255956587# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> local: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:23:08,023 [1259262] DEBUG - p.debug.common.PhpDebugProcess - 255956587# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> extracted: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:23:10,396 [1261635] DEBUG - .connection.PhpDebugConnection - 1172895368#---input stream is finished
2018-05-18 11:23:10,396 [1261635] DEBUG - .connection.PhpDebugConnection - 1172895368#---stop reading
2018-05-18 11:23:10,396 [1261635] DEBUG - .connection.PhpDebugConnection - 1172895368#---stop writing
2018-05-18 11:23:10,397 [1261636] DEBUG - .connection.PhpDebugConnection - 1172895368#----connection stopped
2018-05-18 11:23:10,405 [1261644] DEBUG - il.connection.ServerConnection - ----socket closed
2018-05-18 11:23:12,327 [1263566] DEBUG - il.connection.ServerConnection - Incoming connection on port 9000 from 127.0.0.1
2018-05-18 11:23:12,330 [1263569] DEBUG - .connection.PhpDebugConnection - 347708455#----connection started
2018-05-18 11:23:12,373 [1263612] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:12,373 [1263612] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:12,374 [1263613] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]8
2018-05-18 11:23:12,374 [1263613] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]5
2018-05-18 11:23:12,382 [1263621] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:12,382 [1263621] DEBUG - .php.run.filters.PhpUnitFilter - Path mapper: [email protected]
2018-05-18 11:23:12,382 [1263621] DEBUG - ains.php.run.filters.PhpFilter - Path mapper: [email protected]
2018-05-18 11:23:12,588 [1263827] DEBUG - p.debug.common.PhpDebugProcess - 1213473751# Stop at ('file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc':2,434)
2018-05-18 11:23:12,588 [1263827] DEBUG - p.debug.common.PhpDebugProcess - 1213473751# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> local: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'
2018-05-18 11:23:12,588 [1263827] DEBUG - p.debug.common.PhpDebugProcess - 1213473751# remote: 'file:///var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc' <-> extracted: '/var/www/html/wcgopdev/sites/all/modules/rules/includes/rules.core.inc'

0

Please sign in to leave a comment.