robhuffstedtler has asked for the wisdom of the Perl Monks concerning the following question:

I'm attempting to get ActiveState Visual Perl configured and working for a couple of our windows developers who are going to have to maintain some of my codebase and want to do so in their usual environment. For some reason, I'm having difficulty with remote debugging. I think it is failing to load the proper version of perl5db.pl. To simplify things for testing, I'm currently using my local machine as both the remote and local host. I've started the debugger from within Visual Studio, and it has given me the dialog saying that it is listening on port 3000.

Here are the values for my perl5lib and perldb_opts environment variables:

PERL5LIB="C:\test"
PERLDB_OPTS="RemotePort=itd6m6tw11:3000 PrintRet=0"

I have placed a copy of ActiveState's version of perl5db.pl in C:\test.

When I run perl -d soaptest.pl, it gives a warning near the top that the option is unrecognized:

Invalid option `"RemotePort=itd6m6tw11:3000 PrintRet=0"'

This makes me think it's still loading the default version of perl5db.pl, so I tried forcing it to load the new version, e.g.

set PERL5DB="BEGIN { require 'C:\test\perl5db.pl' }"

Then if I try to debug soaptest.pl, I get this:

C:\test>perl -d soaptest.pl
No DB::DB routine defined at soaptest.pl line 5.

Have I missed something obvious, or is Activestate's documentation a bit weak on this point?

Replies are listed 'Best First'.
Re: Remote debugging problem
by osunderdog (Deacon) on Jan 10, 2005 at 21:55 UTC

    I have a couple of thoughts. The %INC hash contains all the packages (and required scripts) that are loaded and where they are loaded from. So you could dump %INC to find out where perldb5.pl is getting perl5db

    PERLDB_OPTS="NonStop=1" perl -de "while(my(\$key, \$value) = each(%INC +)){print qq{\$key ==> \$value\n};}" perl5db.pl ==> /usr/lib/perl5/5.8.0/perl5db.pl

    Also, rather than using an environment variable to tell perl where to look for the package, you could use the -I option:

    (foo-lnx:Mon Jan 10 14:53:14):~/tmp $cp /usr/lib/perl5/5.8.0/perl5db.pl . (foo-lnx:Mon Jan 10 14:53:31):~/tmp $PERLDB_OPTS="NonStop=1" perl -I. -de "while(my(\$key, \$value) = each +(%INC)){print qq{\$key ==> \$value\n};}" perl5db.pl ==> perl5db.pl

    Hope that helps!

    Sorry, can't help with the RemotePort portion as I don't use Active State.


    "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.

      Thanks. I don't know why it didn't occur to me that perl5db.pl would be listed in %INC. I was, in fact, still including the wrong one, apparently because of the quotes aroung the path in the value for PERL5LIB. I fixed that, and it is now including the right one, but it's still griping about not recognizing the option. I guess it's time to dig into the source for ActiveState's version of the debugger and see if anything leaps out at me.

        Not to Troll too much, but if it was open source I could probably help figure out why it isn't working. (Because I would be using the heck out of it.)


        "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.