On 2007-04-04, at 07:15 EDT, John Sundman wrote:
About hooking Debug.log to Firebug -- are there other reasons for doing this, other than debugging the debugger? When you're compiling to DHTML, do you generally use a two-step/two debugger process (Firebug & LZX debugger), or one debugger? Or?
At the present time, it is always a good practice for the LZX developer to have Firebug, because our debugger does not catch _all_ errors (it would be too much overhead). We try to make our code debuggable in Firebug, as much as possible, but there are several limitations: Firebug does not know about our class system, so it cannot display our objects as intelligently as our debugger, and it does not understand our #file and #line declarations, so it cannot give as accurate error locations as our debugger.
But: Our debugger runs on top of the LFC. If the LFC is broken, it is possible that our debugger will also be broken. If you set `_dbg_log_all_writes = true`, some of the dependencies on the LFC will be skipped, because logging happens at a very low level. So, if you suspect a bug in the debugger, this might be a good strategy. Also, logging is enabled very early on. The debugger actually gets loaded in two stages: there is a primitive debugger that is nearly the first thing to load in the LFC, which is later replaced with the more sophisticated debugger. If you think the LFC initialization is broken, this would be another reason to enable logging.
Actually, when I was debugging this change, I put in a line that always enabled logging, if Firebug was installed. Maybe we should just do that? What do people think?
