Bug 14469 - WebInspector should provide a pretty-printed view of code.
Summary: WebInspector should provide a pretty-printed view of code.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 20308 40969 50239 54664 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-29 16:19 PDT by Kevin McCullough
Modified: 2011-10-20 23:26 PDT (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin McCullough 2007-06-29 16:19:29 PDT
Often code is obfuscated, especially JS code.  Which of course is where the issue is that you are trying to find/fix.  It would be a little helpful if the code could be pretty-printed for readability.  Of course line numbers wouldn't match, so this would probably have to be a view that can be switched between it and the non-pretty-printed view.
Comment 1 Gavin Sherlock 2007-12-17 09:10:41 PST
If this worked in the same way as OmniWeb's implementation, which allows you to reformat the page source so that it is all indented nicely, or provides a view to what the nicely displayed text looks like, that would be great.  I also like that way that in that view it highlight elements with syntax errors or other problems.
Comment 2 Adam Roben (:aroben) 2008-01-29 11:02:19 PST
<rdar://problem/5712838>
Comment 3 Timothy Hatcher 2008-09-28 12:10:44 PDT
*** Bug 20308 has been marked as a duplicate of this bug. ***
Comment 4 David Kilzer (:ddkilzer) 2010-10-28 14:12:16 PDT
MS IE9 Preview 6 now includes this feature:  <http://blogs.msdn.com/b/ie/archive/2010/10/28/html5-using-the-whole-pc-sixth-ie9-platform-preview-available-for-developers.aspx>
Comment 5 Timothy Hatcher 2010-11-30 07:56:41 PST
*** Bug 40969 has been marked as a duplicate of this bug. ***
Comment 6 Timothy Hatcher 2010-11-30 07:56:45 PST
*** Bug 50239 has been marked as a duplicate of this bug. ***
Comment 7 Timothy Hatcher 2010-11-30 07:58:04 PST
If we do this we need to remap breakpoints or simply disable breakpoints and debugging with the pretty source. Obviously debugging would be useful so we should make it work with the pretty source.
Comment 8 Helder Magalhães 2011-02-17 13:03:06 PST
*** Bug 54664 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Pavlov (apavlov) 2011-09-06 09:03:54 PDT
podivilov@chromium.org implemented JS pretty-printing a while ago.
Comment 10 Timothy Hatcher 2011-10-20 16:47:42 PDT
How and where was this implemented? Was/is it V8 only? I don't see it in WebKit for Safari.
Comment 11 Pavel Podivilov 2011-10-20 23:26:19 PDT
(In reply to comment #10)
> How and where was this implemented? Was/is it V8 only? I don't see it in WebKit for Safari.

JavaScript is formatted on front-end side, v8 is not engaged. Last time I checked it worked in Safari, just click "{}" icon at the bottom bar of scripts panel.