On May 28, 10:58 am, Jonathan <[email protected]> wrote: > I'm just starting to use the JavaScript debugger in Firebug v1.7 with > Firefox 4.0 under Windows XP. I have a few questions about behavior > that I don't understand. > > First, running the debugger seems to slow down Firefox drastically, > even for pages where debugging is disabled. Is this normal? Is it
If the Firebug icon is orange, then Firebug is using Firefox debugging features that slow down execution and cause other overhead. If you switch to a tab tat does not have Firebug active, the icon should be gray and performance should be normal. > avoidable? It interferes with using the Web while debugging, and the > only solution I can think of (starting a second debugger) is awkward. > > Second, I have a lot of scripts that reload themselves with a "pass" > parameter that make them do different things on each pass. I can load > one of these scripts, set breakpoints, and reload it. So far, so good. > But when the script reloads itself for the second pass, the > breakpoints disappear! Why is that happening, and how can I prevent > it? I don't understand what you are doing here. Breakpoints are set on URLs. + line numbers. If you load the same file with two different URLs Firebug will think these are two different files. It has no practical way to know that the source is the same. You don't need to reload scripts to get different results from them. > > Third, the whole business of loading a script, setting breakpoints, > and reloading the script seems chancy to me. I haven't had to deal > with this problem yet, but a script can have persistent effects when > loaded, e.g., modifying a database. The conditions you need to test > with are present before the first load; by the time you can set > breakpoints, they've been changed. Is there a way to avoid this? Yes, arrange your test harness to prepare the state of the system in a standard way. This issue is not unique to breakpoints, but rather to reproducibility. jjb -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/firebug?hl=en.
