Edit report at https://bugs.php.net/bug.php?id=30561&edit=1

 ID:                 30561
 Updated by:         ni...@php.net
 Reported by:        asidorov at hotbox dot ru
 Summary:            PHP code execution tracing
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   Windows XP
 PHP Version:        4.3.8
 Block user comment: N
 Private report:     N

 New Comment:

Won't be added to PHP. Stuff like this are the job of debugging extensions.


Previous Comments:
------------------------------------------------------------------------
[2004-10-26 13:02:57] asidorov at hotbox dot ru

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).

------------------------------------------------------------------------
[2004-10-26 12:00:47] der...@php.net

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 https://bugs.php.net/bug.php?id=30561&edit=1

Reply via email to