print in debug 
Author Message
 print in debug

I am trying to print a variable value while debugging
a perl script. However, nothing is printed out after
I use the "p" command.

Here is a sample file:

#!/usr2/local/bin/perl -d

$var=1;
print "var= $var";

Here is the debugging session:

%test

Loading DB routines from $RCSfile: perldb.pl,v $$Revision: 4.0.1.3 $$Date: 92/06/08 13:43:57 $
Emacs support available.

Enter h for help.

main'(test:3):  $var=1;
  DB<1> p $var

  DB<2> p

 DB<2> p var
var
  DB<3> n
main'(test:4):  print "var= $var";
  DB<3> n
var= 1



Mon, 01 Jul 1996 06:14:06 GMT  
 print in debug
: I am trying to print a variable value while debugging
: a perl script. However, nothing is printed out after
: I use the "p" command.
:
: Here is a sample file:
:
: #!/usr2/local/bin/perl -d
:
: $var=1;
: print "var= $var";
:
: Here is the debugging session:
:
: %test
:
: Loading DB routines from $RCSfile: perldb.pl,v $$Revision: 4.0.1.3 $$Date: 92/06/08 13:43:57 $
: Emacs support available.
:
: Enter h for help.
:
: main'(test:3):  $var=1;
:   DB<1> p $var

You haven't executed the assignment yet.   The de{*filter*} prints the line
it's about to execute, not the one it just executed.

Larry



Mon, 01 Jul 1996 16:27:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem getting Perl to print (except when debug running)

2. PERLFUNC: warn - print debugging info

3. PERLFUNC: warn - print debugging info

4. CGI module prints stuff I didn't print

5. Print before sleep prints after sleep

6. Print,send the printed, then do the action (CGI)

7. Print outputs despite no value to print out??

8. print in different codepage = overload print?

9. Printing output to a specific print driver

10. print $fh verses $fh->print

11. printing quotes with print command

12. status print not printing until output

 

 
Powered by phpBB® Forum Software