Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
seems that some vaguely similar problems exist, yet i could not find help so far.
If i want to debug my (local) perl scrpt the debugger stops at EVERY line of code.
I have to stet through the whole script.
If i resume (after the first stop at a line of code) the debuger runs to the end of the code and ignores breakpoints.
Eclipse version 3.6.0
Activeperl on XP and Win7
thanks for any help!
It may be related to an untypical location or naming of your workspace and/or project, which may cause the debugger to report source file paths in a different way than is expected by EPIC, thus making it impossible to recognize breakpoints. Try moving your workspace and/or project to a "simple" location such as c:\workspace to see if it helps. It would also be helpful if you could report back on the cause because this problem is generally hard to reproduce.
I tried to move the workspace and the project. (on 2 different machines, as i said, XP and Win7)
Had no effect. Still the debugger halts at the first (executable) line. Its the first 'my $variable = 'smething'; after some comments and 'use' statements. After that i can only step through with F5 or F6. (see above, code is executed regardless breakpoints).
Could it be, that i have missed some settings somewhere? (there are quite some in Eclipse and Epic)
Ps.: i have included the searchpath for the perl/lib for the walker module… that any hint?
You can chang whether it stops at the first line in EPIC preferences, but it won't make the problem go away.
Enable the debugger console in EPIC preferences and post its content collected during a debugging session in which you step through. You should see how EPIC communicates with the "perl -d" this way and which paths are passed around.
I enabled the console and i think the important (error) message is here:
epic_breakpoints::add_breakpoint($file, $line, $cond);
Undefined subroutine &epic_breakpoints::add_breakpoint called at (eval 14)[C:/Pe
rl/lib/perl5db.pl:638] line 11.
obviously the perl5db.pl has no such subroutine. Its the standard Activestate perl distribution. Should EPIC change this during installation?
No, EPIC does not modify perl5db.pl in place. Instead, it copies it from the Perl installation to a temporary folder, applies its patch in there, and sets up @INC path for the debugged script so that the new version of perl5db.pl rather than the original one is used. With debugging console enabled, you can see the exact command line used to execute perl -d in the Error Log view (or in workspace/.metadata/.log). Maybe it will give you a clue whether or why the wrong perl5db.pl is picked.
Hi again jpolski
First of all i want to emphasize my thanks to you for your fast answers.
However you gave this answer nearly exatly 3 years ago (google told me). As it seems over 3 years this problem persists and was not fixed in (several?) new versions of epic (and eclipse?).
I am a great fan of free software and i absolutely support the idea, but what good does it do, if it costs me so much time to 'fiddle' around an not finding a solution for a problem that should not even exist. (or at least does not exist for most of the epic users)
Well you are definitely not the source of my problem, so please dont read that :-P
Please find here the command line used by EPIC
!MESSAGE Starting Perl debugger:
maybe you could tell me what EXACTLY to do. Install eclipse and epic new and if so, in which directory?
set some variables, and yes how and where, delete files?..etc.
I just want to do a little perl debugging, im not a professional but its realy wierd what a simple eclipse plus epic instalation does here.
This piece is wrong:
It's probably coming from the include path you configured in project properties. Remove it and debugging should work.
When i first installed eclise and epic i could not get it to run because i got the following error message:
Use of uninitialized value in subroutine dereference at (null) line 1.
perl5db.pl did not return a true value.
BEGIN failed--compilation aborted.
Searching the net brought up the solution: i did not have the path to my perl interpreter set.
so i added c:/perl/lib and it worked.
Now you tell me to remove it (which i did) and perl doesnt even start.
The "solution" you found is definitely wrong. Your original problem is due to a bug in Perl PathTools module as detailed here: https://rt.cpan.org/Public/Bug/Display.html?id=56225
The workaround consists in a change to Cwd.pm as suggested here:
Furthermore, if you were using 0.6.36 (rather than 0.6.35), it would have warned you about this very bug.
I patched the sub_win32_cwd in cwd.pm as suggested and removed the path in epic.
Indeed epic runs the perl interpreter.
However the debugger now does not even start. (which it did with the path and the old cwd, it just did not stop at breapoints)
so somehow i am back at the beginning.
what have i missed?
btw version 0.6.36 of what? epic? can find only version 0.6.35.
thanks for all help so far
I uninstalled eclipse and epic and did a fresh clean start.
And indeed i made it all work. I applied the Cwd.pm patch (removing the 'eval' ) and that was it.
Thanks a million for your help and your patience with me.
sometime it really helps to stop fiddling arround after 12h of work and just go to sleep ;-)