ID:               30561
 Updated by:       [EMAIL PROTECTED]
 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 does this just fine, what do you mean?


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to