On Friday 15 February 2008 11:18:26 ANJAN PURKAYASTHA wrote:
> I have a simple script that I'm using to learn debugging:
> #! /usr/bin/perl -w
>
> use strict;
> use warnings;
>
> my $i= 0;
> while ($i<= 15){
>     print ("$i\n");
>     $i++;
>     }
>
> Question: i would like to attach a breakpoint in the program at the step at
> which $i takes on the value of 10. What command is used to do this?
>
> All feedback will be appreciated.
>
> TIA
>
> Anjan

You want to set a watchpoint. This is a conditional breakpoint which is 
activated only when the associated condition is true. To add a watchpoint, 
type 'w expr' in the debugger where expr is the expression which must be true 
in order for the watchpoint to be activated. In your case, type 'w $i == 10'.

Stephen Kratzer
Network Engineer
CTI Networks, Inc.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to