Debugger Chokes on Objects

Help
Sid
2005-03-28
2013-05-20
  • Sid

    Sid - 2005-03-28

    I get the following error when I try to debug an object:

    Error Parsing Debugger Variables
      *******************************
      *******************************
      +++++++Error Parsing Vars++++++
      *******************************
      *******************************
      null
      -------------------------------
      -------------------------------
      +++++++Error Parsing Vars++++++
      -------------------------------
      -------------------------------

    This occurred with both the following versions of Eclipse:

    Version: 3.0.1
    Build id: 200409161125

    and

    Version: 3.0.2
    Build id: 200503110845

    I have:
        ActiveState Perl 5.8.3.809
        EPIC 0.3.0 (the newest so far as I can tell)

    I have installed PadWalker from the EPIC site.

    Here is some simple test code to demonstrate the problem:

    Obj.pm:

    package Obj;
    use warnings;
    use strict;

    sub new() {
        my $caller = shift();
        my $class = ref($caller) || $caller;
        my $self = {};
        bless($self, $class);
        return $self;
    }

    1;

    driver.pl:

    use Obj;
    use warnings;
    use strict;

    my $obj = Obj->new();

    When I launch driver.pl in the debugger, it starts at the last line. I click step into. The source view switches to display Obj.pm. The first line of sub new is highlighted, and the error dialog appears. The error reappears every time I click step into.

    There is no problem if I step over the instantiation of the object.

     
    • Eric Young

      Eric Young - 2005-04-01

      A bit of a me too, with a bit more information.  Can anyone help with this? 

      My setup, Windows XP, Eclipse 3.0.2, EPIC 0.3.10, Perl = cygwin 5.8.6

      It appears that this is related to Padwalker and packages.  I have test code that runs OK without Padwalker installed but crashes the debugging processes (meaning the perl script stops running) when Padwalker is installed.

      It appears Padwalker is having problems getting to locally scoped variables within the non-default packages (or something like that).

      Here's my test code:

      TestModule.pm:

      package TestModule;
      use strict;
      use warnings;
      use Exporter();
      our @ISA = qw (Exporter);
      our @EXPORT = qw( ModuleSubroutine );
      our @EXPORT_OK =  qw(  );
      sub ModuleSubroutine
      {
          my $input = shift;
          print "Our Input was: $input\n";
      }

      1;

      driver.pl:
      #!/usr/bin/perl

      use TestModule;
      print "This is a test\n";

      testmainsub("fun fun fun");
      ModuleSubroutine("blah");
      print "Then we have this line, to follow\n";
      sub testmainsub
      {
          my $a = shift;
          print "A main subroutine with locally scoped var with value: $a\n";
      }

      In the error condition, the 'testmainsub' seems to work fine but ModuleSubroutine will die on the first line of the sub.

      When I remove Padwalker from my perl install,  I get the annoying 'install padwalker' message, but it does run to the end.

       

Log in to post a comment.