[Webkit-unassigned] [Bug 20308] New: Pretty print minimized/obfuscated JS code for readability and debugging

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 6 14:55:28 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20308

           Summary: Pretty print minimized/obfuscated JS code for
                    readability and debugging
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Enhancement
          Priority: P2
         Component: Web Inspector
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: aclark at zimbra.com


JavaScript apps are often deployed with the source minimized (or obfuscated).
This results in the source being reduced to a single line or multiple lines
with multiple statements per line. This makes it very difficult to read when
the debugger traps on an error. Also, it is impossible to set meaningful
breakpoints because they are set on lines, not statements.

The first request for enhancement is to add a setting that will pretty-print
the JS source. So even if the code is minimized, it will appear as separate
lines, indented appropriately, and with added whitespace between tokens for
readability. Even though the process of minimization often renames local
variables this would allow the developer to more easily associate the lines of
code back to the original source.

The second request for enhancement falls out from the first request because
once the source code is pretty-printed, each statement appears on a separate
line. Then the user should be allowed to set breakpoints on these statements
(or "virtual lines" of code). This allows the developer to read and debug the
JS source in a deployed environment.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list