Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Exceptional!
Tue, Mar 5 2013 6:44 AMPermanent Link

Matthew Jones

I just found some horrible bug in my code, where it was accessing an empty XML node,
and stopping the browser running the code properly. How on earth does one debug
such? If this was Delphi, then I'd use Exceptions, but that would be hard and EWB
won't do them surely? Quick try /except in the source to see that it fails to
compile. Hmm, no, it works! And it really works. I checked the help, got the
details on the EError type, and hey presto much better handled situation, and I was
able to work out what was failing and fix it.

Really pleased with that - exceptional, as I'll say again.

/Matthew Jones/
Tue, Mar 5 2013 1:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< I just found some horrible bug in my code, where it was accessing an
empty XML node, and stopping the browser running the code properly. How on
earth does one debug such? If this was Delphi, then I'd use Exceptions, but
that would be hard and EWB won't do them surely? Quick try /except in the
source to see that it fails to compile. Hmm, no, it works! And it really
works. I checked the help, got the details on the EError type, and hey
presto much better handled situation, and I was able to work out what was
failing and fix it.

Really pleased with that - exceptional, as I'll say again. >>

Smile Another good debugging tool is the LogOutput procedure in the WebHTTP
unit.  It will dump out anything that you want to the EWB IDE messages
panel, which can help with figuring out what is going on.  Of course, the
easiest way to track down this type of thing is to make sure that the
project isn't compressed and run it in FF/Chrome with the debugger.  The
code is very easy to follow, and you can usually track things down pretty
quick.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Mar 12 2013 9:04 AMPermanent Link

Matthew Jones

> Another good debugging tool is the LogOutput procedure in the
> WebHTTP unit.  It will dump out anything that you want to the EWB
> IDE messages panel, which can help with figuring out what is going
> on.

I'd not realised that this actually posted back to the server! In my case, it seems
to be causing errors as the default URL is http and my server is https, but that's
the point of the URL part. Could be handy.

http://stackoverflow.com/questions/164397/javascript-how-do-i-print-a-message-to-the
-error-console says that there is a console.log which might be handy to use (with
IE variation).

/Matthew Jones/
Image