Not quite sure why you don't debug first without running through a browser,
but.... 

> From: Gary Rathbone <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Wed, 13 Sep 2000 18:19:28 +0100
> To: [EMAIL PROTECTED]
> Subject: Re: Trapping Errors
> 
> Its all Mac based and I'm using MC as an HTTP server with additional code to
> process forms. It works a treat... until I make a mistake like a typo...
> 
> If I type :
> 
> on mouseUp
> put "thtml" ito "pageout"
> end mouseUp
> 
> into the button script of any stack, its accepted ie no semantic error. When
> I click on the button however an error "Cant find handler" along with line
> number and other error info is presented in the Execution Error dialog box.
> Great - enough info to locate and fix the problem.
> 
> Now if the above routine is called by a browser through a socket connection
> to an MC stack then MC doesn't present the same Execution Error box and the
> only clue that something is wrong is that nothing is returned to the
> browser. Hence manually searching through the code. Any ideas ?
> 

It should be possible to build in a debugger that works with the server, but
figuring out how to do this/how the existing debugger works is not easy, and
according to Scott is likely to be a moving target...

An idea (if you have to debug online), is to put the cgi script into a
variable and then have a go at something like

repeat with lineNum = 1 to the number of lines of cgiScript
  put line lineNum of cgiScript into scriptLine
  try
   do scriptLine
  catch errorNum
    put "Error" && errorNum && "on line" && lineNum
  end try
end repeat

It'll be slow, but might work?
  


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to