RESOLVED FIXED 14469
WebInspector should provide a pretty-printed view of code.
https://bugs.webkit.org/show_bug.cgi?id=14469
Summary WebInspector should provide a pretty-printed view of code.
Kevin McCullough
Reported 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.
Attachments
Gavin Sherlock
Comment 1 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.
Adam Roben (:aroben)
Comment 2 2008-01-29 11:02:19 PST
Timothy Hatcher
Comment 3 2008-09-28 12:10:44 PDT
*** Bug 20308 has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
Comment 4 2010-10-28 14:12:16 PDT
Timothy Hatcher
Comment 5 2010-11-30 07:56:41 PST
*** Bug 40969 has been marked as a duplicate of this bug. ***
Timothy Hatcher
Comment 6 2010-11-30 07:56:45 PST
*** Bug 50239 has been marked as a duplicate of this bug. ***
Timothy Hatcher
Comment 7 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.
Helder Magalhães
Comment 8 2011-02-17 13:03:06 PST
*** Bug 54664 has been marked as a duplicate of this bug. ***
Alexander Pavlov (apavlov)
Comment 9 2011-09-06 09:03:54 PDT
podivilov@chromium.org implemented JS pretty-printing a while ago.
Timothy Hatcher
Comment 10 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.
Pavel Podivilov
Comment 11 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.
Note You need to log in before you can comment on or make changes to this bug.