Anon: Fehlersuche (Trace)

Beitrag lesen

Glückwunsch, Bessinger, die Auskunftsqualität des Forums ist mal wieder unter aller Sau. Was du möchtest, ist nicht Trace, sondern Watch.

  
$ perl -de'while (1) {  

>     $foo++;  
>     $bar++;  
> }'  
  
  
  
  
Loading DB routines from perl5db.pl version 1.3  
Editor support available.  
  
Enter h or `h h' for help, or `man perldebug' for more help.  
  
main::(-e:1):   while (1) {  
  DB<1> w $foo  
  DB<2> n  
main::(-e:2):       $foo++;  
  DB<2> n  
Watchpoint 0:   $foo changed:  
    old value:  ''  
    new value:  '1'  
main::(-e:3):       $bar++;  
  DB<2> n  
main::(-e:2):       $foo++;  
  DB<2> n  
Watchpoint 0:   $foo changed:  
    old value:  '1'  
    new value:  '2'  
main::(-e:3):       $bar++;  
  DB<2> n  
main::(-e:2):       $foo++;  
  DB<2> n  
Watchpoint 0:   $foo changed:  
    old value:  '2'  
    new value:  '3'  
main::(-e:3):       $bar++;  
  DB<2> W *  
Deleting all watch expressions ...  
  DB<3> q