Cannot break in some modules (OS X)

fred80 wrote on Tue Feb 27 19:20:31 CET 2007:
Mac OS X (10.3), perl 5.8.6, epic 0.5.31


I cannot get the perl debugger in epic to break at points in modules where
the module (.pm) is found in the same directory as the main source file
(.pl).
I don't have any problems with breaks either in the main .pl file, or in
other modules elsewhere


As you can see from the debug console output below, the debug cannot load
either FredBio.pm or FredBioUTR.pm, which are found in the 'local' directory.
However it can load /sw/lib/perl5/site_perl/5.8.6/Bio/Tools/Run/Alignment/Clustalw.pm,
which is elsewhere on my system, and it successfully breaks at a point
in this file (after skipping the breakpoints in FredBio.pm or FredBioUTR.pm).


This appears to be similar to the issue of FOo4sOuRcE in:
http://sourceforge.net/forum/forum.php?thread_id=1648642&forum_id=258688

i.e. that the correct command to perl debug should be 'f FredBio.pm' 
not 
'f /Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm'

- as suggested in that thread I tried adding the path to the folder containing
the files to the project's @INC, but this unfortunately didn't help.

(I thought I would post a new thread as this is not a windows issue).

 
Many thanks for your great efforts with epic,

Freddie






Debug console output:
~~~~~~~~~~~~~~~~~~~~

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/0-04.pl:16):
16:	my $html_output                         = 1;
  DB<1> printf $DB::OUT "%vd", $^V;
5.8.6
  DB<2> f /Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBioUTR.pm
No file matching `/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBioUTR.pm'
i
s loaded.
  DB<3> b load /Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBioUTR.pm
Will stop on load of `/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBioUTR.p
m'.
  DB<4> f /Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm
No file matching `/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm'
is l
oaded.
  DB<5> b load /Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm
Will stop on load of `/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm
/
Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBioUTR.pm'.
  DB<6> f /Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm
No file matching `/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm'
is l
oaded.
  DB<7> b load /Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm
Will stop on load of `/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBio.pm
/
Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/FredBioUTR.pm'.
  DB<8> f /sw/lib/perl5/site_perl/5.8.6/Bio/Tools/Run/Alignment/Clustalw.pm
1 	# $Id: Clustalw.pm,v 1.48 2006/09/28 23:14:03 bosborne Exp $
2 	#
3 	# BioPerl module for Bio::Tools::Run::Alignment::Clustalw
4 	#
5 	# Cared for by
6 	#
7 	# Copyright Peter Schattner
8 	#
9 	# You may distribute this module under the same terms as perl itself
10 	# POD documentation - main docs before the code
  DB<9> b 644
  DB<10> .
main::(/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/0-04.pl:16):
16:	my $html_output                         = 1;
  DB<10> T
  DB<10> .
main::(/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/0-04.pl:16):
16:	my $html_output                         = 1;
  DB<10> .
main::(/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/0-04.pl:16):
16:	my $html_output                         = 1;
  DB<10> c
Bio::Tools::Run::Alignment::Clustalw::_run(/sw/lib/perl5/site_perl/5.8.6/Bio/Tools/Run/Alignment/Clu
stalw.pm:644):
644:	    my $output = $self->output || 'gcg';
  DB<10> .
Bio::Tools::Run::Alignment::Clustalw::_run(/sw/lib/perl5/site_perl/5.8.6/Bio/Tools/Run/Alignment/Clu
stalw.pm:644):
644:	    my $output = $self->output || 'gcg';
  DB<10> .
Bio::Tools::Run::Alignment::Clustalw::_run(/sw/lib/perl5/site_perl/5.8.6/Bio/Tools/Run/Alignment/Clu
stalw.pm:644):
644:	    my $output = $self->output || 'gcg';
  DB<10> T
$ = Bio::Tools::Run::Alignment::Clustalw::_run(ref(Bio::Tools::Run::Alignment::Clustalw),
'align', '
/tmp/EEhurr6G16/ahUAnSRzUh', ' -dnamatrix=IUB -gapopen=10 -gapext=5 -maxdiv=30
-gapdist=8 -pwdnamatr
ix=IUB -pwgapopen=10 -pwgapext=0.1 -outfile=/tmp/EEhurr6G16/8ky31ZOE5v >/dev/null
2>/dev/null') call
ed from file `/sw/lib/perl5/site_perl/5.8.6/Bio/Tools/Run/Alignment/Clustalw.pm'
line 490
$ = Bio::Tools::Run::Alignment::Clustalw::align(ref(Bio::Tools::Run::Alignment::Clustalw),
ref(ARRAY
)) called from file `FredBio.pm' line 117
. = FredBio::create_alignment('C25A1-7-1.dna.output/output-aln/C25A1.7.1.phy',
ref(Bio::Seq), ref(Bi
o::Seq), ref(Bio::Seq), ref(Bio::Seq), ref(Bio::Seq)) called from file `FredBioUTR.pm'
line 240
. = FredBioUTR::compare_utr_orf_with_other_species(ref(HASH), *main::HOMOLOGY,
'C25A1-7-1.dna.output
/output-fasta', 'C25A1-7-1.dna.output/output-aln', 'C25A1-7-1.dna.output/output-pretty-aln',
200, 50
0, 'briggsae-cb3', 'remanei1.0', 'PB2801-1.0') called from file `/Users/freddie/Programming/eclipse-
workspace/UTR-withGFF-UTRcheck/0-04.pl' line 186
  DB<10> .
Bio::Tools::Run::Alignment::Clustalw::_run(/sw/lib/perl5/site_perl/5.8.6/Bio/Tools/Run/Alignment/Clu
stalw.pm:644):
644:	    my $output = $self->output || 'gcg';
  DB<10> 

jploski wrote on Tue Feb 27 19:42:46 CET 2007:
I can reproduce your problem on Linux, but not when the project @INC contains
the full path to the project directory. Can you post the output of foreach
$i(@INC) { print "$i\n"; } here?

It looks as below for me (EPICTest2 being the directory with *.pl and *.pm):

/home/jpl/eclipse-workspaces/workspace-epic-testing/org.epic.perleditor-test/workspace/EPICTest2
/home/jpl/eclipse-workspaces/workspace-epic-testing/org.epic.perleditor-test/workspace/.metadata/.plugins/org.epic.debug
/usr/local/src/CPAN/ppi/lib/perl/5.8.7
/usr/local/src/CPAN/ppi/lib/perl/5.8
/usr/local/src/CPAN/ppi/share/perl/5.8.7
/etc/perl
/usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
/usr/local/lib/perl/5.8.7
/usr/local/share/perl/5.8.7
/usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4
.
fred80 wrote on Tue Feb 27 22:09:07 CET 2007:
Thanks for your help, it has resolved my problem. 

It turns out that my the path to the project in @INC was getting messed
up by another value added to @INC by EPIC that I had made a mistake in setting.
I have sorted it out and it now works fine.

Apologies, it seems that it was my error, not an issue with epic breakpoints.


For your info, if in the project properties->Perl include path window, you
add an entry with a leading space, it is appended to the previous value
of @INC, rather than added as an further list value (maybe this has some
use that I am not aware of?).

i.e. if you add two entries to the list in the window:

 /test
/test2

then ' /test' as appended to another value of @INC (and then neither work
ok), '/test2' is correctly added as a new value.


i.e. if you do:
  
foreach my $i(@INC) {print "$i\n";}

you get:


/Users/freddie/Programming/eclipse-workspace/UTR-withGFF-UTRcheck/ /test
/test2
/Users/freddie/Programming/eclipse-workspace/.metadata/.plugins/org.epic.debug
/sw/lib/perl5-core/5.8.6/darwin-thread-multi-2level
/sw/lib/perl5-core/5.8.6
/sw/lib/perl5/site_perl/5.8.6/darwin-thread-multi-2level
/sw/lib/perl5/site_perl/5.8.6
/sw/lib/perl5/site_perl/5.8.6/darwin-thread-multi-2level
/sw/lib/perl5/site_perl
.



(Obviously this is a minor issue - if I had typed it in correctly I wouldn't
have noticed.)


Many thanks again for your work on EPIC. 


jploski wrote on Tue Feb 27 23:09:52 CET 2007:
The thing with space is a bug. The whole @INC dialog should be updated one
day...

Also, your experience confirms that the path of the executed script should
be prepended to @INC automatically by EPIC. Entering it manually is an unnecessary
workaround.
foo4source wrote on Wed Mar  7 05:39:30 CET 2007:
Fred, 

I'm glad to hear that you got this working on your Mac.   

I sure wish I knew the secret to making Windows work.

Take care, 
FOo
jploski wrote on Thu Mar  8 20:18:14 CET 2007:
Foo, see also the discussion at https://sourceforge.net/tracker/index.php?func=detail&aid=1672279&group_id=75859&atid=545274

Maybe you can implement the workaround mentioned there.

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