Missing breakpoints while CGI debugging

Help
Tim
2005-09-28
2013-05-20
  • Tim
    Tim
    2005-09-28

    Hi,

    I've found a number of references to this problem, but no solution... sorry to post again!

    Basically, I'm using Eclipse 3.1.0 and EPIC 0.3.12 (although I've tried other versions and had the same problem), I can debug perl scripts no problem.  However, when I start a "Perl CGI" debug session, the browser is started, and the script is run, but EPIC doesn't stop at the beginning of the perl code (or at any of my breakpoints), and the page just loads unimpeded.  I've tried the internal browser, IE6 and Firefox, all result in the same problem.

    The following appears in the console (the last two lines after a pause, by which time the script has run, and the page loaded in the browser).

    #### CONSOLE OUTPUT ####
    Found default config file
    Server started on 5014
    LOG: 5 5014-server: main.: starting handler: cgi
    LOG: 5 5014-server: main.: starting handler: file
    LOG: 4 5014-server: 127.0.0.1: new connection
    LOG: 3 5014-127.0.0.1-0: Request 24 GET /index.html HTTP/1.1
    LOG: 5 5014-127.0.0.1-0: main.: invoking handler: cgi
    LOG: 5 5014-127.0.0.1-0: cgi. suffix=.pl root=G:/Web/cgi-bin url: /index.html
    LOG: 5 5014-127.0.0.1-0: Checking for suffix: .pl
    LOG: 5 5014-127.0.0.1-0: cgi. looking for: G:\Web\cgi-bin\index.html.pl
    LOG: 5 5014-127.0.0.1-0: main.: invoking handler: file
    LOG: 5 5014-127.0.0.1-0: file.: Looking for file: (G:/Web/htdocs)(\index.html)
    LOG: 3 5014-127.0.0.1-0: request done
    LOG: 3 5014-127.0.0.1-0: Error: 408 Request Time-out: Read timed out
    LOG: 4 5014-127.0.0.1-0: socket close

    #### END OF CONSOLE LOG ####

    My webserver is apache 2.0.

    Any ideas what the problem could be?

    Thanks in advance,

    Tim

     
    • Jan Ploski
      Jan Ploski
      2005-09-28

      Based on the output you quoted, no CGI script is ever being executed. The EPIC's built-in web server seems to be serving the file index.html to the client. If no CGI script is run, it is no wonder that the debugger does not stop anywhere, right?

       
  • David
    David
    2013-05-06

    For others who may be trying to get Perl CGI breakpoints to work, here's a few tips:

    - use the latest EPIC: it starting work for Windows in 0.6.49 (try Help|Check for Updates)
    - As said above, you must set the debug configuration/Web Server/HTML Root Directory to a path with forward slashes.
    - for the HTML startup file to validate as in this directory, it too must use foward slashes.  Apparently, C:\XX\file is not considered in C:/XX
    - If you use the Browse button for either it will switch back to backslashes

    So, twiddle these two paths until you have only forward slashes in the Root directory and Startup file path, and no errors at the top of the setup dialog.
    go debug…

    see the thread "Debugging CGI scripts skips breakpoints" for the discussion related to this fix.

     
  • Jan Ploski
    Jan Ploski
    2013-05-07

    Nice to see that it works now! Thanks for helping to narrow down the cause.

     
  • David
    David
    2013-05-07

    you're welcome. glad it works - now I can get back to the real work and use it to understand our code better.