Again, variables not showing in debug

adebree wrote on Wed Aug 20 23:31:30 MEST 2008:
Hi there,

I've read a lot about people having the same problem I'm having: in debugging
the Variables not showing. None of the tips / suggestions solved it for
me, so I'm hoping to find a sollution this way. 

In short I'm using Windows XP PROF UK SP3, Sun Java JRE 1.5, Eclipse 3.4,
ActivePerl 5.10 (have tried cygwin's perl with the same result), PadWalker
1.7 from PPM - Bribes repository (and CPAN for the Cygwin try) and EPIC
0.6.25 (Perl Debug Plug-in being 0.6.19).


I've used a 2 lines perl test file:

my $x = 'foo';
print $x; 


Having the default 'suspend at first line' option active, but when debugging
nothing shows up in the 'variables' view. Even not after stepping to the
next line. All 'show' options of the 'variables' view are checked.

By suggestion of Jan in some earlier threads I've turned on debug console
and the output when debugging is as follow:


Loading DB routines from perl5db.pl version 1.3
Editor support available.

Enter h or `h h' for help, or `perldoc perldebug' for more help.

main::(C:/12. Workspaces/Try/PerlTry/bin/test.pl:1):
1:	my $x = 'foo';
  DB<1> printf $DB::OUT "%vd", $^V;
5.10.0
  DB<2> print $DB::OUT eval { require PadWalker; PadWalker->VERSION(0.08)
}
1.7
  DB<3> ;{
my $file = <<'EOT';
C:/12. Workspaces/Try/PerlTry/bin/try.pl
EOT
my $line = <<'EOT';
19
EOT
my $cond = '';

epic_breakpoints::add_breakpoint($file, $line, $cond);
};

  DB<4> .
main::(C:/12. Workspaces/Try/PerlTry/bin/test.pl:1):
1:	my $x = 'foo';
  DB<5> T
  DB<6> .
main::(C:/12. Workspaces/Try/PerlTry/bin/test.pl:1):
1:	my $x = 'foo';
  DB<7> .
main::(C:/12. Workspaces/Try/PerlTry/bin/test.pl:1):
1:	my $x = 'foo';
  DB<8> .
main::(C:/12. Workspaces/Try/PerlTry/bin/test.pl:1):
1:	my $x = 'foo';
  DB<9> .
main::(C:/12. Workspaces/Try/PerlTry/bin/test.pl:1):
1:	my $x = 'foo';
  DB<10> .
main::(C:/12. Workspaces/Try/PerlTry/bin/test.pl:1):
1:	my $x = 'foo';
  DB<11> ;{
do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_package_vars;

my $savout = select($DB::OUT);
dumpvar_epic::dump_package_vars();
select($savout);
};

3|$^A|1|1|17|SCALAR(0x183f19c)|2|''|1|2
3|$^D|1|1|17|SCALAR(0x182b2cc)|3|'0'|1|3
3|$^E|1|1|17|SCALAR(0x1911e4c)|18|'Access is denied'|2|18
3|$^F|1|1|17|SCALAR(0x191fbfc)|3|'2'|1|3
3|$^H|1|1|16|SCALAR(0x23ae64)|5|'256'|1|5
3|$^L|1|1|17|SCALAR(0x183effc)|3|''|1|3
3|$^O|1|1|17|SCALAR(0x183e8dc)|9|'MSWin32'|1|9
3|$^P|1|1|17|SCALAR(0x190692c)|5|'831'|1|5
16|$^RE_TRIE_MAXBUF|1|1|17|SCALAR(0x1846c8c)|7|'65536'|1|7
3|$^S|1|1|17|SCALAR(0x1ba2d1c)|3|'1'|1|3
7|$^TAINT|1|1|17|SCALAR(0x1be2d0c)|3|'1'|1|3
9|$^UNICODE|1|1|17|SCALAR(0x18dfc2c)|3|'0'|1|3
3|$^V|1|2|14|REF(0x1a15dc4)|23|version=HASH(0x1a15de4)|9|'v5.10.0'|1|9
3|$^W|1|1|17|SCALAR(0x18c8e64)|3|'1'|1|3
14|$^WARNING_BITS|1|1|17|SCALAR(0x188e6fc)|14|'UUUUUUUUUUUU'|2|14
3|$^X|1|1|16|SCALAR(0x23b0f4)|22|'C:\Perl\bin\perl.exe'|2|22
2|$!2|$"2|$$2|$%2|$-2|$/2|$02|$:2|$<2|$=2|$?2|$@4|%ENV4|@INC4|%SIG18|FileHandle(STDERR)17|FileHandle(STDIN)18|FileHandle(STDOUT)2|$]2|$^18|FileHandle(stderr)17|FileHandle(stdin)18|FileHandle(stdout)2|$|2|$~
  DB<12> 




It might be the 'Access is denied' in this debug output, but no clue where
that refers to.

Toggling between a different view and the variables results in a minor addition
to the debug console:



do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_package_vars;

my $savout = select($DB::OUT);
dumpvar_epic::dump_package_vars();
select($savout);
};

3|$^A3|$^D3|$^E3|$^F3|$^H3|$^L3|$^O3|$^P16|$^RE_TRIE_MAXBUF3|$^S7|$^TAINT9|$^UNICODE3|$^V3|$^W14|$^WARNING_BITS3|$^X2|$!2|$"2|$$2|$%2|$-2|$/2|$02|$:2|$;2|$<2|$=2|$?2|$@4|%ENV4|@INC4|%SIG18|FileHandle(STDERR)17|FileHandle(STDIN)18|FileHandle(STDOUT)2|$]2|$^18|FileHandle(stderr)17|FileHandle(stdin)18|FileHandle(stdout)2|$|2|$~
  DB<13> 


This plugin has a nice potential and since I've come from a pure classic
vi setup it's a joy having all these convenience bells and whistles available.
The variables inspector would be the icing on the top ;)



Anyone having a good suggestion?

Gr, Arne
jploski wrote on Thu Aug 21 08:32:02 MEST 2008:
1. The long list you see in the debug console are the transmitted variables
- their names and values, one per line.
2. The variable $x does not show up in that list. However, that's normal
if the debug console contents you provided was captured before stepping
to the second line. Before the variable has been defined, it does not show
up in the Variables view - this is expected. Can you post the content from
the debug console *after* stepping over the my $x = 'foo' line - does the
$x (or any suspicious messages) show up in the console then?
3. I think that the "Access is denied" is irrelevant - it is just the value
of the built-in variable $^E
4. Have you tried selecting global and Perl internal variables to be shown
using the pulldown menu of the Variables view (after the debugger is running)?
Do these variables show up correctly (you may need to relaunch debugger
to see them)?
adebree wrote on Thu Aug 21 20:06:16 MEST 2008:
Thx for the quick response Jan!

After some further fiddling around with Eclipse it apears that the 'Enable
taint mode' (on the 'Perl EPIC' preferences tab, which I kind of enabled
by instinct...) is the cause of the variables not appearing. I've turned
it off and now the debugger does present the variables to me. yay! ;)

I guess it's 'solved' for now, will try to find some time to do a replication
test on another system about this behaviour. Or is it it by design and am
I missing a point?
jploski wrote on Thu Aug 21 20:21:06 MEST 2008:
It's not by design, and I can't reproduce it on my Linux machine.

Note: The above is an archived snapshot of a forum thread. Use the original thread at sf.net to post comments.