2010/9/6 Aryeh Gregor <simetrical+wikil...@gmail.com>:
> Then you have to hope that the bug still occurs.  Probably it will,
> but you never know.  Plus, it would be nice if there weren't that
> extra step.  Of course, even if they de-minified things, you'd still
> have no comments and so on, but at least the line number would mean
> something.
>
Actually, the line number would not mean a great deal because the
scripts would still be combined, comments frequently take up entire
lines and the deminifier cannot account for blank lines, statements
broken over multiple lines, or multiple statements on one line. All
this means it's impossible to map the line number to a source line and
file, although I agree it does map it to a statement: someone else can
add a breakpoint at the same line of the same combined+minified output
(provided they're also hitting the same load.php URL) and have that
break at the exact statement the reporter got their error on.

But all that is just theorizing about deminifying debuggers, which I
don't think exist right now. The only thing we can do in practice is
change the environment to remove the impediments to debugging we
introduced and hope that doesn't make any bugs go away. We do this not
only by obtaining each module's JS unminified in a separate request
(unfortunately, we can't request CSS style sheets separately for
dynamically requested modules because the technique needed for this is
not as widely supported), but also by ensuring that all manipulation
of JS and CSS we do (such as wrapping JS in a
mediaWiki.loader.implement() call, direction flipping in CSS and image
embedding in CSS) don't introduce or remove any lines, thereby
preserving line numbers.

Roan Kattouw (Catrope)

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to