V
vnick
Hi,
following my posting (Invisible variables in Perl debugger)
started on 3. Feb. 2005 I have now a runable
version of the problem that some vars are invisible in the Perl
debugger:
(I ran Perl with setenv PERLDB_OPTS NonStop)
---------------------------------------------------debug_visibility_problem_1.pl:
#!/usr/local/bin/perl -w
$DB::single = 1;
my $abc = 7;
$efg = 6;
print "$abc + 1 = $efg\n";
require "debug_visibility_problem_2.pl" ;
exit 0;
---------------------------------------------------
debug_visibility_problem_2.pl:
#!/usr/local/bin/perl -w
$DB::single = 1;
my $a = 8;
$debug = 1;
print "Local: $a Global: $debug\n";
1;
---------------------------------------------------
If I run debug_visibility_problem_1.pl in the debugger I see this:
DB<20> l
4==> my $abc = 7;
5: $efg = 6;
6: print "$abc + 1 = $efg\n";
7
8: require "debug_visibility_problem_2.pl" ;
9
10: exit 0;
11
DB<20> s
main:debug_visibility_problem_1.pl:5):
5: $efg = 6;
DB<20> s
main:debug_visibility_problem_1.pl:6):
6: print "$abc + 1 = $efg\n";
DB<20> p $abc
7
DB<21> s
7 + 1 = 6
main:debug_visibility_problem_1.pl:8):
8: require "debug_visibility_problem_2.pl" ;
DB<21> s
main:debug_visibility_problem_2.pl:3):
3: $DB::single = 1;
DB<21> l
3==> $DB::single = 1;
4: my $a = 8;
5: $debug = 1;
6
7: print "Local: $a Global: $debug\n";
8
9: 1;
DB<21> s
main:debug_visibility_problem_2.pl:4):
4: my $a = 8;
DB<21> s
main:debug_visibility_problem_2.pl:5):
5: $debug = 1;
DB<21> p $a
Use of uninitialized value in print at (eval 25)
<<<<<<<[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2.
DB<22> s
main:debug_visibility_problem_2.pl:7):
7: print "Local: $a Global: $debug\n";
DB<22> p $debug
1
---------------------------------------------------
I can not see the lexical var(s) ($a) whereas I can see the global
one(s) ($debug) in the second script included with the require command.
Am I missing a major point here or can I regard this as a debugger
"feature"(bug?).
Thanks
Volker
following my posting (Invisible variables in Perl debugger)
started on 3. Feb. 2005 I have now a runable
version of the problem that some vars are invisible in the Perl
debugger:
(I ran Perl with setenv PERLDB_OPTS NonStop)
---------------------------------------------------debug_visibility_problem_1.pl:
#!/usr/local/bin/perl -w
$DB::single = 1;
my $abc = 7;
$efg = 6;
print "$abc + 1 = $efg\n";
require "debug_visibility_problem_2.pl" ;
exit 0;
---------------------------------------------------
debug_visibility_problem_2.pl:
#!/usr/local/bin/perl -w
$DB::single = 1;
my $a = 8;
$debug = 1;
print "Local: $a Global: $debug\n";
1;
---------------------------------------------------
If I run debug_visibility_problem_1.pl in the debugger I see this:
DB<20> l
4==> my $abc = 7;
5: $efg = 6;
6: print "$abc + 1 = $efg\n";
7
8: require "debug_visibility_problem_2.pl" ;
9
10: exit 0;
11
DB<20> s
main:debug_visibility_problem_1.pl:5):
5: $efg = 6;
DB<20> s
main:debug_visibility_problem_1.pl:6):
6: print "$abc + 1 = $efg\n";
DB<20> p $abc
7
DB<21> s
7 + 1 = 6
main:debug_visibility_problem_1.pl:8):
8: require "debug_visibility_problem_2.pl" ;
DB<21> s
main:debug_visibility_problem_2.pl:3):
3: $DB::single = 1;
DB<21> l
3==> $DB::single = 1;
4: my $a = 8;
5: $debug = 1;
6
7: print "Local: $a Global: $debug\n";
8
9: 1;
DB<21> s
main:debug_visibility_problem_2.pl:4):
4: my $a = 8;
DB<21> s
main:debug_visibility_problem_2.pl:5):
5: $debug = 1;
DB<21> p $a
Use of uninitialized value in print at (eval 25)
<<<<<<<[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2.
DB<22> s
main:debug_visibility_problem_2.pl:7):
7: print "Local: $a Global: $debug\n";
DB<22> p $debug
1
---------------------------------------------------
I can not see the lexical var(s) ($a) whereas I can see the global
one(s) ($debug) in the second script included with the require command.
Am I missing a major point here or can I regard this as a debugger
"feature"(bug?).
Thanks
Volker