Jen, this is a nasty gotcha for debugging particular types of code. I think we should try to make this better, admittedly most of the process will be advocating to the js team to make changes in Spidermonkey.
There's a careful balance of deoptimizing code when the debugger is connected. There are two ideals: one is that there are no noticeable perf regressions when the debugger is connect, since soon we are going to connect the debugger whenever the devtools are opened (not just when the debugger is clicked). The other is that you get a full view into what's happening in the system in the debugger. These ideals are in conflict. Ideally it's configurable, and I think the default for this should be on. But we shouldn't have to make users go into about:config to turn it off. In fact, could we just flip that pref ourselves in the debugger with an option? (we'll need some good UX to make sifting through many options feel nice)
(In reply to James Long (:jlongster) from comment #3) > ... since soon we are going to connect > the debugger whenever the devtools are opened (not just when the debugger is > clicked). Shame - I like the fact that the debugger is not activated until its tab is opened. > Ideally it's configurable, and I think the default for this should be on. Uh... not following you. I think the default for optimization should be OFF when devtools is open. Agreed? > But we shouldn't have to make users go into about:config to turn it off. In > fact, could we just flip that pref ourselves in the debugger with an option? > (we'll need some good UX to make sifting through many options feel nice) Possibly. But why ship a tool that can't be used "out of the box"? The best solution is to reconfigure settings auto-magically for developers when the devtools are open. That won't be possible for all settings in all circumstances, I agree, but again, why would you want a debugger that can't view variables? Seems like a no-brainer to me.
(In reply to Jeff Griffiths (:canuckistani) from comment #2) > Jen, this is a nasty gotcha for debugging particular types of code. I think > we should try to make this better, admittedly most of the process will be > advocating to the js team to make changes in Spidermonkey. Noted - as discussed on IRC, we'll talk to Jim et al and see what we can do.
Check out bug 1193046. We also want to make it possible to even be able to *use* a page when the tools are open (notably games). Disabling all optimizations when our tools are open significantly degrades performance. Heck, why not switch everything to interpreted mode, where everything is clearly debuggable? You wouldn't even be able to use most pages then, however. It's a balance.
You need to log in before you can comment on or make changes to this bug.