Start Debugger problem

skickahitnu wrote on Wed Oct 12 19:39:23 MEST 2005:
I have the following setup:
+ Windows XP
+ EPIC
+ Eclipse SDK, Version: 3.1.0
+ ActivePerl 5.8.7.813
+ J2SE Runtime Environment 5.0 Update 2

The following pops up in console window when I am trying to start the debugger:

Unable to connect to remote host: 
"My IP address":5002
Compilation failed in require.
 at D:/Documents and Settings/Mange/workspace/CountInstructions/count.pl
line 0
	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.
 at D:/Documents and Settings/Mange/workspace/CountInstructions/count.pl
line 0

What does this mean ?

Newbie

skickahitnu wrote on Wed Oct 12 19:42:36 MEST 2005:
I have the EPIC 0.3.0 version
marcbernst wrote on Sun Jan  8 05:44:45 CET 2006:
Possibly you do not have the correct version of padwalker.pm installed.
Only use the one you can download from the epic web page on sourceforge.

You will need this even if you have other issues.
saurabhz wrote on Sat Jan 28 04:56:10 CET 2006:
Infact I am also facing the same problem. Can you please tell me what is
the possible solution.

Also can someone tell me where to set the perl interpreter. and where you
set the perl libraries?

regards,
SAurabh
huw_walters wrote on Fri Feb 24 04:25:59 CET 2006:
Yes, that's pretty much what I'm getting.  I can run Perl scripts from within
Eclipse, but when I try to debug them I get "Launching (50%)" for 20s, then
the following console message, which is practically identical to the one
reported by Magnus:

Unable to connect to remote host: :5000
Compilation failed in require.
at D:/Projects/Eclipse/EclipseTest/Main.pl line 0
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.
at D:/Projects/Eclipse/EclipseTest/Main.pl line 0

I'm using the version of PadWalker from the EPIC page on sourceforge.net
(unzipped into C:\Perl\site\lib and C:\Perl\site\lib\auto\PadWalker) as
I'm aware the ActiveState version won't work with my setup:

Windows 2000 Pro SP4
J2SE runtime 5.0 update 6
ActivePerl 5.8.7.815
Eclipse Platform 3.1.2
EPIC 0.3.0
PadWalker for Perl 5.8.1+

Is there some way I should configure Perl to work with the Eclipse debugger?
 I've tried configuring Eclipse to use both perl.exe and wperl.exe in the
EPIC preferences, but both behave the same way.  Is there something I should
be doing with PPM?  Should I run an earlier version of one of these components?

I would very much like to use Eclipse for Perl development, but if I can't
use the integrated debugger, it won't be my ideal solution, and I'll have
to consider Komodo (which, though a fine IDE, runs a bit slowly for my taste).

Any help would be greatly appreciated!
ronw_000 wrote on Wed Mar  1 17:27:07 CET 2006:
Have you tried installing the ActiveState Padwalker module first via PPM
and then unzipping the EPIC Padwalker over it?  This has worked for me on
older versions of Perl and EPIC and is now one of my SOP (Standard Operating
Procedure) habits.
ronw_000 wrote on Wed Mar  1 17:34:40 CET 2006:
Don't forget to unzip the files into the correct locations/folders (same
as the ActiveState locations)  Usually I unzip the EPIC padwaldker (using
folders with overwrite on) into the perl directory. (site/lib is already
in the folder path in the zip file.)  Be sure that you are using the correct
EPIC padwalker for your version of Perl.  (For me it is the "PadWalker Module
for ActiveState 5.8.1 or higher")
ronw_000 wrote on Wed Mar  1 17:41:12 CET 2006:
Also, you set the perl executable location by selecting the Window/Preferences/Perl
EPIC menu in Eclipse (the root of the Perl EPIC tree).  There are many other
options you can set also.  Setting the perl executable location resolves
many possible issues.  This and more information is in the Help/Help Contents/EPIC
Users Guide menu in Eclipse or in the downloadable Users Guide.  Have Fun!
huw_walters wrote on Tue Mar  7 23:31:13 CET 2006:
Hi, thanks for the reply.

Yes, a good idea to unzip PadWalker over the PPM installation, but I'm afraid
it doesn't seem to make any difference; I get exactly the same "Unable to
connect to remote host" error.

I unzipped padwalker_010_Perl5_8_1.zip (correct for my installation of ActivePerl,
version 5.8.7.815) into C:\Perl, with one file in C:\Perl\site\lib and four
files in C:\Perl\site\lib\auto\PadWalker.

However, I'm not sure an incorrectly configured PadWalker is the cause of
my problems; to quote the EPIC user's guide, "It is possible to use the
debugger without installing PadWalker. But in this case local variables
won't be shown".  I'm not even getting that far; the "Unable to connect
to remote host" error tells me that Perl is somehow failing to listen for
debuggers.

I've tried both C:\Perl\bin\perl.exe and C:\Perl\bin\wperl.exe, with the
default ActivePerl installation.

Can I assume other developers *are* able to step through Perl scripts, as
the documentation suggests?  It's not like my test script is doing anything
dodgy, is it? (-:

> use strict;
> use PadWalker qw(peek_my peek_sub);
>
> for my $index (1 .. 20)
> {
>     print "$index\n";
> }

Many thanks,

Huw
jploski wrote on Tue Mar  7 23:49:52 CET 2006:
You assume correctly, the debugger works for me both under Windows and under
Linux. Although I am using the CVS version, 0.3.12 should be ok too.

The way it is supposed to work is that when you launch a script in debug
mode, the EPIC debugger plug-in starts listening on a TCP port (the port
number is a dynamically generated one above 5000). Then the Perl interpreter
is launched with a -d switch and the environment variable PERLDB_OPTS set
to "RemotePort= DumpReused ReadLine=0". The interpreter should then
connect to the listening port and send its debug prompt there.

Maybe you have a firewall problem?
jploski wrote on Wed Mar  8 23:25:06 CET 2006:
I managed to reproduce the described problem in Windows XP today while attempting
to start the CGI debugger. In that context it was caused by CGI environment
variables replacing the global environment rather than being merged in properly.
I committed a fix to CVS. However, the non-CGI debugger was not affected
by this bug in my case.

Here is a potential workaround for those of you having debugger connect
problems with the "Compilation failed in require" message: try hacking your
c:/Perl/lib/perl5db.pl script by inserting the following statement somewhere
near the top:

$ENV{'SystemRoot'} = 'C:/Windows';

Replace 'C:/Windows' with the correct path. You can figure it out either
by guessing or by dumping environment variables with 'set' in a cmd.exe
prompt.
huw_walters wrote on Mon Mar 20 23:08:56 CET 2006:
Thanks for the suggestions, but I'm afraid I'm still having major trouble
here. )-:  I'm no longer getting that "Unable to connect to remote host"
error.  However ...

The debugger seems to be half working, in that if I change the number of
executions in a "for (;;) { print ... }" loop, I have to click the "resume"
button on the debug toolbar a proportional number of times, before the final
program output appears in the console window.  However, at no point does
it show anything in the variables window, or indicate that a breakpoint
has been hit.

Maybe I'm missing something about the way the Eclipse GUI works, but surely
more than that should be happening when a breakpoint is hit?!

I tried disabling my firewall software (after physically unplugging my modem,
naturally!) but this made no difference.  And I know I have the right version
of PadWalker installed.

Huw

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