View Issue Details

IDProjectCategoryView StatusLast Update
0001103XdebugUsage problems (Wrong Results)public2015-02-22 14:29
ReporterrequinixAssigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.2.3 
Target VersionFixed in Version2.3.0 
Summary0001103: XDEBUG_SESSION_STOP_NO_EXEC only stops first script executed with auto_prepend|append_files
DescriptionGiven a setup with auto_prepend_file and/or auto_prepend_file configured, XDEBUG_SESSION_STOP_NO_EXEC will stop the first file encountered from executing but subsequent file(s) will still execute.

So
- prepend + script = script executes,
- prepend + script + append = script and append execute
- script + append = append executes
Steps To ReproduceUsing the command-line, PHP's built-in server, and three files:
./prepend.php: <?php error_log("prepend"); echo " prepend";
./script.php: <?php error_log("script"); echo " script";
./append.php: <?php error_log("append"); echo " append";

(session 1:)
$ php -d auto_prepend_file=prepend.php -d auto_append_file=append.php -S localhost:8080 -t .
(outputs version, paths, etc.)

(session 2:)
$ curl -s http://localhost:8080/script.php?XDEBUG_SESSION_STOP_NO_EXEC
DEBUG SESSION ENDED script append

(session 1:)
[%s] script
[%s] append
[%s] 127.0.0.1:%d [200]: /script.php?XDEBUG_SESSION_STOP_NO_EXEC
Additional InformationAn older XDebug used to stop all three files - not sure what version but PHP 5.3 era.
It would output something like "DEBUG SESSION ENDEDDEBUG SESSION ENDEDDEBUG SESSION ENDED", which I didn't understand at the time but it makes sense now: one message for each file stopped.
TagsNo tags attached.
Operating System
PHP Version5.5.5-5.5.9

Activities

derick

2015-01-31 09:42

administrator   ~0002978

I can reproduce it, and I've made a PR that Travis is now testing: https://github.com/xdebug/xdebug/pull/149

derick

2015-02-01 12:59

administrator   ~0002979

Fixed for 2.2.8 and 2.3.0dev.

Issue History

Date Modified Username Field Change
2015-01-31 03:17 requinix New Issue
2015-01-31 09:42 derick Note Added: 0002978
2015-01-31 09:42 derick Assigned To => derick
2015-01-31 09:42 derick Status new => acknowledged
2015-02-01 12:59 derick Note Added: 0002979
2015-02-01 12:59 derick Status acknowledged => closed
2015-02-01 12:59 derick Resolution open => fixed
2015-02-01 12:59 derick Fixed in Version => 2.2.8
2015-02-22 14:29 derick Fixed in Version 2.2.8 => 2.3.0
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)