A COBOL application probably isn't spewing errors to the general public's web browsers. To do so can expose security vulnerabilities. So the more common approach is to spew a 500 Internal Server Error (to not expose more than is needed), and to log the error to error logs on the web host.

What gets logged is up to the person who developed the web application or CGI application. If the diagnostics aren't sufficient, add better diagnostic information to the error messages. While you're at it, make sure that you're actually handling errors usefully; that you're logging somewhere in the first place. And make sure that there are logfiles configured.

Debugging CGI is something you have to design into your CGI application. If a COBOL application were interacting over the CGI you would be facing the same concerns; this isn't a Perl-specific issue. There's nothing other than sanity preventing you creating a CGI application in COBOL. Once you do that, you'll find it equally challenging (perhaps more-so) to debug in a CGI environment. The point is that CGI layers in a whole other element of complexity, and that complexity has to be managed through more meticulous application design and architecture.


Dave


In reply to Re: Why CGI is hard debug by davido
in thread Why CGI is hard debug by blackjackstory.com

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.