remote debugging - breakpoints doesn't work

Help
Anonymous
2012-07-09
2013-05-20

  • Anonymous
    2012-07-09

    I have following configuration:

    HOST with EPIC(in Eclipse project) ( windows ):

    libs_A\*.pm
          (1) my_test.pl  - simple script to test EPIC breakpoints (Works well - stops at breakpoint)
          (2) production_script.pl - big script ( use libs from libs_A and libs_B) - breakpoint doesn't work - doesn't stop (if choose stop EPIC debugger at first line and do step-by-step - its possible to reach break point)

    remote debug configuration:
    - project; file to execute - (1) or (2)
    - local host ip + port 192.168.9.165:5000
    - capture output is not set
    + enable debug console

    REMOTE HOST (unix, perl 5.8):

    libs_A\
    libs_B\ (doesn't exist in Eclipse project, but used by libs_A)

    exist /home/ld/ *epic*.pm useful package (need for remote debug with epic)

    perl -V
      %ENV:
        PERL5DB="BEGIN { require '/home/ld/perl5db.pl'; }"    - perl5db.pl (ver 1.33) patched by EPIC
        PERL5LIB="/home/ld:/long_path/libs_A:/long_path/libs_B"
        PERLDB_OPTS="RemotePort=192.168.9.165:5000 DumpReused"
      @INC:
        /home/ld
        /long_path/libs_A
        /long_path/libs_B
        /usr/local/lib/perl5/5.8.8/BSDPAN
        /usr/local/lib/perl5/site_perl/5.8.8/mach
        /usr/local/lib/perl5/site_perl/5.8.8
        /usr/local/lib/perl5/site_perl
        /usr/local/lib/perl5/5.8.8/mach
        /usr/local/lib/perl5/5.8.8
        .

    PROBLEM:
    1) I start EPIC remote debug lunch(set breakpoint) + debug at remote host with:
    perl -d /long_paths/my_test.pl :
    - All works (EPIC debugger stops at my line)

    2) I start EPIC remote debug (set breakpoint) at production_script.pl (2) + at remote host:
    perl -d /long_paths/production_script.pl :

    EPIC debugger doesn't stop at breakpoint! script working to end and exit
    Elipse send error:
    at org.epic.debug.db.PerlDebugThread.terminate(PerlDebugThread.java:272)
    at org.epic.debug.util.DebuggerProxy.terminate(DebuggerProxy.java:153)

    org.epic.debug\.log - is empty

    How I can fix or debug working breakpoints?

    Debug console log:

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

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

    Object::CODE(0x98e4b44)(/log_path/libs_B/AGE/CPAN/Object.pm:256):
    256: $STAGE{INIT} = 1;
      DB<1> printf $DB::OUT "%vd", $^V;
    5.8.8
      DB<2> ;{foreach $t(@INC) {print $DB::OUT $t."\n";}}
    /long_path/libs_B/AGE/CPAN
    /long_path/libs_B/../../
    /long_path/libs_A/
    /home/ld
    /long_path/libs_A/
    /usr/local/lib/perl5/5.8.8/BSDPAN
    /usr/local/lib/perl5/site_perl/5.8.8/mach
    /usr/local/lib/perl5/site_perl/5.8.8
    /usr/local/lib/perl5/site_perl
    /usr/local/lib/perl5/5.8.8/mach
    /usr/local/lib/perl5/5.8.8
    .

      DB<3> print $DB::OUT eval { require PadWalker; PadWalker->VERSION(0.08) }
    1.94
      DB<4> ;{
    my $file = <<'EOT';
    /long_path/libs_A/production_script.pl
    EOT
    my $line = <<'EOT';
    78
    EOT
    my $cond = '';

    epic_breakpoints::add_breakpoint($file, $line, $cond);
    };

      DB<5> .
    Object::CODE(0x98e4b44)(/log_path/libs_B/AGE/CPAN/Object.pm:256):
    256: $STAGE{INIT} = 1;
      DB<6> T
    $ = Object::INIT() called from file `./long_path/libs_A/production_script.pl' line 0
    $ = eval {…} called from file `/long_path/libs_A/production_script.pl' line 0
      DB<7> ;{
    my $file = <<'EOT';
    /long_path/libs_A/production_script.pl
    EOT

    epic_breakpoints::get_abs_path($file);
    };
    /long_path/libs_A/production_script.pl

      DB<8> ;{
    my $file = <<'EOT';
    /long_path/libs_A/production_script.pl
    EOT

    epic_breakpoints::get_abs_path($file);
    };
    /long_path/libs_A/production_script.pl

      DB<9> .
    Object::CODE(0x98e4b44)(/log_path/libs_B/AGE/CPAN/Object.pm:256):
    256: $STAGE{INIT} = 1;
      DB<10> c
    _permit_for_group 4  816613 at /log_path/libs_B/AGE/CPAN/AutoSuspend.pm line 60.
    at /opt/debug.ld/vhosting/cgi/billing/VH/SvAutoSuspend.pm line 60
    Billing::Template::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 415
    eval {…} called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 407
    Error::subs::try('CODE(0xb7b6e50)', 'HASH(0xb98a4dc)') called at /log_path/libs_A/Billing/Template.pm line 430
    Billing::Template::launchMain('Billing::Template=HASH(0xb67529c)', 'CODE(0xb3982c8)') called at /long_path/libs_A/production_script.pl line 67
    Debugged program terminated.  Use q to quit or R to restart,
      use o inhibit_exit to avoid stopping after program termination,
      h q, h R or h o to get additional info. 
    q
      DB<11>

    /long_path/libs_A/production_script.pl - works to the end - but doesn't stop at breakpoint

     

  • Anonymous
    2012-07-09

    target host set properly at Eclipse remote debug run configuration

     
  • Jan Ploski
    Jan Ploski
    2012-07-10

    Could it be that the breakpoint's location is within some string eval or require'd code? EPIC is currently not able to deal with string evals and may be confused about paths if you use 'require' in liberal ways. Generally, try moving the breakpoint around a bit to see if it is the particular location that is the problem or whether there might be some trouble with mapping remote paths to local.

    Because you have one case that works and another that doesn't, you should be able to track down the problem by transplanting parts of the non-working script into the working one and observing when it starts skipping the breakpoints.

    You might also have some luck by inserting "$DB::single = 1;" before the statement on which the breakpoint is set.