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.

Close

Does not stop at breakpoints

Help
Anonymous
2013-04-22
2013-05-20

  • Anonymous
    2013-04-22

    Hi,

    I am debugging Perl CGI. Suspend debugger at first statement works and I can continue debugging without problems.
    But it does not stop at breakpoints. I have tried adding C:\workspaces\perl\.metadata\.plugins\org.epic.debug to PERL5LIB and library path.

    This is perl, v5.10.0 built for MSWin32-x86-multi-thread
    EPIC 0.5.46 org.epic.feature.main.feature.group Epic Project
    Version: Juno Service Release 2
    Build id: 20130225-0426

    Please help!

     
  • Jan Ploski
    Jan Ploski
    2013-04-22

    Upgrade to EPIC testing (0.6.x), then try again.

     

  • Anonymous
    2013-04-22

    Thank you for your quick reply. I am using 0.6.47 now and get the same results.
    Also I am using strawberry 5.16.3. now. Always ignoring my breakpoints

     
  • Jan Ploski
    Jan Ploski
    2013-04-22

    Remove everything from include path in project properties and PERL5LIB and wherever you made changes. Start with a "Hello world" CGI script. Are breakpoints ignored then?

     

  • Anonymous
    2013-04-22

    Yes. Still ignored. In my launch config I have
    HTML Root Directory: C:\workspaces\perl\test
    HTML Startup File: C:\workspaces\perl\test\start.html
    CGI Root Directory : C:\workspaces\perl\test

    start.html:
    <!doctype html>
    <head></head>
    <body></body>
    <a href="/foo.pl">Link</a>
    <form name="formData" action="/foo.pl" method="post">
    <input type="submit" name="submit" value="Login" />
    </form>
    </body>
    </html>

    foo.pl:
    #!/usr/bin/perl
    use strict;
    print "Hello?";
    print "Hello?";
    print "Hello?";

     

  • Anonymous
    2013-04-22

    Also it is called twice?

    Found default config file
    Server started on 5004
    LOG: 5 5004-server: main.: starting handler: cgi
    LOG: 5 5004-server: main.: starting handler: file
    LOG: 4 5004-server: 0:0:0:0:0:0:0:1: new connection
    LOG: 3 5004-0:0:0:0:0:0:0:1-0: Request 24 GET /start.html HTTP/1.1
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: main.: invoking handler: cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: suffix=.cgi,.pl,.ssp root=C:/workspaces/perl/test url: /start.html
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: Checking for suffix: .cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: looking for: C:\workspaces\perl\test\start.html.cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: Checking for suffix: .pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: looking for: C:\workspaces\perl\test\start.html.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: Checking for suffix: .ssp
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: looking for: C:\workspaces\perl\test\start.html.ssp
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: main.: invoking handler: file
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: file.: Looking for file: (C:/workspaces/perl/test)(\start.html)
    LOG: 3 5004-0:0:0:0:0:0:0:1-0: request done
    LOG: 3 5004-0:0:0:0:0:0:0:1-0: Request 23 GET /foo.pl HTTP/1.1
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: main.: invoking handler: cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: suffix=.cgi,.pl,.ssp root=C:/workspaces/perl/test url: /foo.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: Checking for suffix: .cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: looking for: C:\workspaces\perl\test\foo.pl.cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: Checking for suffix: .pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: looking for: C:\workspaces\perl\test\foo.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: found: C:\workspaces\perl\test\foo.pl
    LOG: 3 5004-0:0:0:0:0:0:0:1-0: Error: 500 Server Error: Missing header from cgi output
    LOG: 3 5004-0:0:0:0:0:0:0:1-0: request done
    LOG: 4 5004-0:0:0:0:0:0:0:1-0: socket close
    LOG: 4 5004-server: 0:0:0:0:0:0:0:1: new connection
    LOG: 3 5004-0:0:0:0:0:0:0:1-1: Request 24 GET /foo.pl HTTP/1.1
    LOG: 5 5004-0:0:0:0:0:0:0:1-1: main.: invoking handler: cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-1: suffix=.cgi,.pl,.ssp root=C:/workspaces/perl/test url: /foo.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-1: Checking for suffix: .cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-1: looking for: C:\workspaces\perl\test\foo.pl.cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-1: Checking for suffix: .pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-1: looking for: C:\workspaces\perl\test\foo.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-1: found: C:\workspaces\perl\test\foo.pl
    LOG: 3 5004-0:0:0:0:0:0:0:1-1: Error: 500 Server Error: Missing header from cgi output
    LOG: 3 5004-0:0:0:0:0:0:0:1-1: request done
    LOG: 4 5004-0:0:0:0:0:0:0:1-1: socket close

     
  • David
    David
    2013-04-23

    I believe I'm having a similar problem. My settings (other than versions below) seem to be the same.  I've tried using a very simple CGI script, and the breakpoints are ignored when run as a CGI debug configuration, but the same .pl file and same breakpoints work fine when run as just Perl-Local. Does this suggest something?

    Eclipse: Juno, SR1
    EPIC: 0.6.45
    Perl: v5.16.2  for MSWin32-x86-multi-thread, ActiveState build 1602

    The flags from the console log show:
    Requested URI: /cgi-bin/process_form.pl
    --------------CGI Command Line---------------
    C:/Perl/bin/perl.exe
    -IC:/Users/olsond/workspace/mySandbox/PerlApache/cgi-bin
    -IC:/Users/olsond/workspace/.metadata/.plugins/org.epic.debug
    -d
    C:\Users\olsond\workspace\mySandbox\PerlApache\cgi-bin\process_form.pl

    (I have not cleared my Perl5Lib variable though (don't have admin rights) but breakpoints work when run through a Perl local config…)

    any ideas?
    Thanks for your suggestions,
    DAvid

     
  • Jan Ploski
    Jan Ploski
    2013-04-24

    In any case, when you are having problems with EPIC debugger, the first step should be to upgrade to 0.6.x.

    The general diagnosis is that when breakpoints are ignored, it is caused by paths used to refer to source files in Eclipse (EPIC) and paths used in perl -d not matching. So when "perl -d" reports a suspend to EPIC, EPIC cannot associate the event with any of the known breakpoints it installed and therefore issues a resume. There have been many threads in this forum about it and also about how to examine the problem using "Debugger console (experimental)" setting. Please check them and/or post the output. If there is a difference between how the path to C:\Users\olsond\workspace\mySandbox\PerlApache\cgi-bin\process_form.pl is displayed in "Debugger console (experimental)" during the breakpoint installation step and on (skipped) suspend event, this might give a clue about what is wrong or possible workarounds.

     
  • David
    David
    2013-04-24

    Thank you for your reponse and for explaining one of the causes behind skipping breakpoints. I'll dig into it deeper.  (I had read about 9 threads on the epic site, but none of them mentioned these things.)
    David

     

  • Anonymous
    2013-04-25

    In the debugger console I get the following error:

    main::(E:\EquityStory-ERS\cgi-bin\login.ssp:8):
    8: my($database_handler,$base,$libPath,%in);
      DB<1> printf $DB::OUT "%vd", $^V;
    5.10.0
      DB<2> print $DB::OUT eval { require PadWalker; PadWalker->VERSION(0.08) }
    1.96
      DB<3> ;{
    my $file = <<'EOT';
    C:/workspaces/perl/test/foo.pl
    EOT
    my $line = <<'EOT';
    11
    EOT
    my $cond = '';

    epic_breakpoints::add_breakpoint($file, $line, $cond);
    };
    Undefined subroutine &epic_breakpoints::add_breakpoint called at (eval 14) line 11.

    What could cause this?

     
  • Jan Ploski
    Jan Ploski
    2013-04-25

    Apparently it is picking up the wrong perl5db.pl: "K:/lib/perl5db.pl". Why and where does this version come from?

    It should be using the version of perl5db.pl supplied by EPIC (written dynamically on each launch to workspace/.metadata/.plugins/org.epic.debug/perl5db.pl). Possibly your @INC path is wrong. When you click on the "CGI Process" item in Debug view, you should be able to see "CGI Command Line" used to call perl. It should contain "-I/path/to/workspace/.metadata/.plugins/org.epic.debug". If you have another (bad) perl5db.pl somewhere on @INC in front of it, that't the reason it can't work.

     

  • Anonymous
    2013-04-25

    Indeed I had my Perl's lib directory in the include path. Now, after removing it the progress bar hangs at 57% and I have to kill eclipse to continue.

     

  • Anonymous
    2013-04-25

    Is this the correct fix for Cwd.pm?

    Replacing

        if (defined &DynaLoader::boot_DynaLoader) {

    with

        if (*DynaLoader::boot_DynaLoader{CODE}) {

     

  • Anonymous
    2013-04-26

    Solved my problem. Some module installed a Cwd.pm in site/lib