Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Debugger failing to connect to localhost

by smitz (Chaplain)
on May 14, 2003 at 12:27 UTC ( #258049=perlquestion: print w/replies, xml ) Need Help??

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

Darndest thing ever, fellow monks. I was playing with the perl -d test.pl debugger, and it failed with an odd looking error about connecting to localhost. Of course, I assumed it was my test.pl script, but it aint. Join me below the readmore tag for hot code action.
C:\perl -v This is perl, v5.8.0 built for MSWin32-x86-multi-thread C:\>more test.pl #!perl use strict; my $var = 'Beard\n'; print $var; C:\>perl -d test.pl Unable to connect to remote host: 127.0.0.1:2000 Compilation failed in require. main::BEGIN() called at C:/Perl/lib/perl5db.pl line 0 eval {...} called at C:/Perl/lib/perl5db.pl line 0 BEGIN failed--compilation aborted.
Thanks for any input, I really dont even know where to begin (ha!) on this one. Of course the test.pl is irrelevant, but why on earth is the debugger attempting a connection?

Confused Smitz

Replies are listed 'Best First'.
Re: Debugger failing to connect to localhost
by Thelonius (Priest) on May 14, 2003 at 12:49 UTC
    Looking at the code, it seems that the only way this could happend is if you set the option RemotePort. It looks for options in a couple of places. First it looks for a file called (on windows) "perldb.ini" in the current directory, your home directory (if $ENV{HOME} is defined), or $ENV{LOGDIR} (if defined).

    It then looks for an environment variable called PERLDB_OPTS.

    Hope that helps.

Re: Debugger failing to connect to localhost
by BrowserUk (Patriarch) on May 14, 2003 at 12:57 UTC

    It looks like you have the "remoteport=localhost:nnn" set in an environment variable called PERLDB_OPTS or possible a config file (called ./.perldb or ~/.perldb) containing parse_options("remoteport=localhost:nnn").

    See perldebug and/or

    perl -de1 h O ... RemotePort Remote hostname:port for remote debugging ...

    For (a little) more information.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
      Folks who try Active States Dev Kit end up with this error when the demo runs out because the de-installer doesn't clean this Environment Variable up. So, you will have to do it yourself. You can do it from the system properties on the environment variables tab if you are on 2K/XP.
      He! perl -del dies with the same message, and I definately dont have an env. var. like that set, I've listed all of them below.
      Thanks for the suggestions though, keep them coming :-)

      Smitz
      Update: In fact, I do have that Env Var set. Wake up, smitz
Re: Debugger failing to connect to localhost
by smitz (Chaplain) on May 14, 2003 at 13:40 UTC
    I AM BLINDER THAN A FRUIT BAT

    Thanks all! Problem solved.

    Smitz
Re: Debugger failing to connect to localhost
by smitz (Chaplain) on May 14, 2003 at 13:28 UTC
    My ENV:
    C:\>set ADP=LDAP://CN=Schmitz\, AlexX,OU=Workers,DC=ger,DC=corp,DC=xxxx,DC=com ALLUSERSPROFILE=C:\Documents and Settings\All Users APPDATA=C:\Documents and Settings\aschmi1X\Application Data CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=ASCHMI1X-DESK ComSpec=C:\WINNT\system32\cmd.exe DJGPP=C:|djgpp\djgpp.env FTP_proxy=ftp://proxy.isw.xxxxx.com:21 HOMEDRIVE=C: HOMEPATH=\ HTTP_proxy=http://proxy2.isw.xxxxx.com:911 LANG=enu LOGONSERVER=\\SWSGER001 NUMBER_OF_PROCESSORS=1 OS=Windows_NT Os2LibPath=C:\WINNT\system32\os2\dll; Path=C:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C: +\Oracle\Or a81\BIN;C:\Program Files\Oracle\jre\1.1.7\bin;C:\httpd\php;C:\djgpp\bi +n;C:\progr am files\resource kit; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PERLDB_OPTS=RemotePort=127.0.0.1:2000 PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 3, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=0803 ProgramFiles=C:\Program Files PROMPT=$P$G PSTLoc=C:\Documents and Settings\mtrattlx\Local Settings\Application D +ata\Micros oft\Outlook RABUILD=AMR SMS_LOCAL_DIR=C:\WINNT SMS_LOCAL_DIR_USER=C:\WINNT SYBASE=C:\SQL10 SystemDrive=C: SystemRoot=C:\WINNT TEMP=C:\DOCUME~1\aschmi1X\LOCALS~1\Temp TMP=C:\DOCUME~1\aschmi1X\LOCALS~1\Temp USERDNSDOMAIN=ger.corp.intel.com USERDOMAIN=GER USERNAME=aschmi1x USERPROFILE=C:\Documents and Settings\aschmi1X windir=C:\WINNT
    And I have searched all my drives for a file called perldb.ini, and found nothing. The thing is, this isn't the first time I've used the debugger, and it always worked fine. Grrrrr

    Smitz

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://258049]
Approved by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-08-15 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?