On 2007-05-08, at 09:18 EDT, mt1 wrote:

Hi all,
How do you debugging in DHTML mode?
I have just start to use Firebug, and it is great tool for debugging Ajax.
In the case of OL4 also can use it, but the report of errors and
warnings are
mysterious for me, and it cannot change the code according to them
directory.
Cause of them, i feel it hard to use for OL4.
So let me know what are you using debugging tool for OL4's DTHML ?

1) Use the Laszlo Debugger as a first resort. It will catch many errors and will report their source correctly. It knows how to inspect LZX objects just like the SWF debugger.

Note: DHTML debugging does not work in Safari 1 or 2, although it does work in WebKit. (You can build a version of the debug system from source that will work in Safari by editing lps.properties -- details on request.)

2) Use Firebug as a backup. Be sure to enable debug mode in Laszlo first, because in debug mode the compiler will not compress the Javascript, making it easier to read. Also in debug mode, the compiler will insert 'location comments' in the Javascript that relate the javascript back to your source files. They look like this:

/* -*- file: mousewheel.lzx#5.10 -*- */

which tells you this line of code was generated from the source file mousewheel.lzx, line 5, column 10. You can interpolate by searching back from the error displayed in firebug to find the nearest location comment.

Note: when Firebug is installed, Laszlo Debugger debug, info, warn, and error messages will also be displayed on the Firebug console.

3) Read up on Debug.trace and Debug.monitor. These both work in SWF and Firefox (the latter depends on a Javascript 1.5 feature).

Reply via email to