View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001165 | Xdebug | Step Debugging | public | 2015-06-20 18:30 | 2020-03-12 16:51 |
Reporter | unknownbrackets | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.3.3 | ||||
Fixed in Version | 2.5.1 | ||||
Summary | 0001165: Step Out skips subsequent function calls | ||||
Description | Xdebug performs the "step out" or "finish" operation based on stack level, rather than function unit. What this means is that when you Step Out from a function that is an argument, or a method that is part of a chain, it behaves incorrectly with respect to standard debugging behavior found in other languages. -[Unknown] | ||||
Steps To Reproduce |
function foo($arg) function bar() foo(bar()); ?>
| ||||
Additional Information | I'm thinking of attempting a patch for this. My thinking is that this would require examining op_array, and potentially storing more info to determine a change in active function unit. Would you accept such a patch? Do you expect it necessary to include an option to retain the old, but unusual, stepping behavior? | ||||
Tags | No tags attached. | ||||
Operating System | Any | ||||
PHP Version | 5.6.5-5.6.9 | ||||
|
I suppose the easiest way would be to check op_array->function_name and op_array->scope->name. So something like this: if (XG(context).do_finish) { / could still check level to try to skip some? / if (!stmt_func_name || !leave_func_name) { if (!match) { In a common case, I suppose the pointers would be identical, so it might not perform badly to simply refcount it. I'm not super familiar with the PHP source, though. Also would need to check if that handles namespaces right. -[Unknown] |
|
Hmm, closures also - line_start might be necessary. -[Unknown] |
|
Fixed in Git for 2.5.1 by comparing the function numbers. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-06-20 18:30 | unknownbrackets | New Issue | |
2015-07-04 01:00 | unknownbrackets | Note Added: 0003145 | |
2015-07-04 01:05 | unknownbrackets | Note Edited: 0003145 | |
2015-07-04 01:05 | unknownbrackets | Note Edited: 0003145 | |
2015-07-06 01:47 | unknownbrackets | Note Added: 0003146 | |
2016-12-11 15:23 | derick | Relationship added | has duplicate 0000842 |
2016-12-11 15:43 | derick | Note Added: 0003993 | |
2016-12-11 15:43 | derick | Status | new => closed |
2016-12-11 15:43 | derick | Assigned To | => derick |
2016-12-11 15:43 | derick | Resolution | open => fixed |
2016-12-11 15:43 | derick | Fixed in Version | => 2.5.1 |
2020-03-12 16:51 | derick | Category | Feature/Change request => Step Debugging |