ID: 30561
User updated by: asidorov at hotbox dot ru
Reported By: asidorov at hotbox dot ru
Status: Open
Bug Type: Feature/Change Request
Operating System: Windows XP
PHP Version: 4.3.8
New Comment:
XDebug doesn't trace variables automatically. I need expicitly call
xdebug_var_dump(), var_dump() or echo. I mean that trace will dump all
variables, expressions. Something like dumping program execution tree
all expression trees and how they are collapsing.
There are situations where I need to know how my code is ran in true
details. I suppose it is hard to implement (simply I don't know how the
interpreter is implemented so I really don't know).
Previous Comments:
------------------------------------------------------------------------
[2004-10-26 12:00:47] [EMAIL PROTECTED]
Xdebug does this just fine, what do you mean?
------------------------------------------------------------------------
[2004-10-26 11:48:22] asidorov at hotbox dot ru
Description:
------------
The very very helpful thing would be adding trace capability to PHP to
avoid writing all this annoying var_dump's and echo's. Example output
is unsuitable ofcourse. It is provided just to show the idea. There may
be some number of output templates (full, medium, ...).
I know that there are debug_backtrace() and xDebug but those are not
the requested.
Thank you and best regards.
Reproduce code:
---------------
<?php
/* ... */
// deep - deepness of tracing function calls
// output - output file
##TRACE medium, deep(0), output('trace.txt')
// ...
for ($i=0; $i<$n; $i++) {
$a += $arr1[$i]/$arr2[$i] + foo($i);
}
// ...
##ENDTRACE
/* ... */
?>
Expected result:
----------------
trace.txt:
//for ($i=0; $i<$n; $i++) {
Init: $i=0;
Loop:
1) 0($i) < 1($n) == TRUE
//$a += $arr1[$i]/$arr2[$i+1] + foo($i);
$a = -1($a) + 3($arr1[0]) / 2($arr2[1]) + 0(foo(0)) == 0.5
2) 1($i) < 1($n) == FALSE
End loop.
//}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30561&edit=1