Bug 14469
| Summary: | WebInspector should provide a pretty-printed view of code. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kevin McCullough <kmccullough> |
| Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | aclark, apavlov, ap, ddkilzer, helderjsm, joepeck, paulirish, peter, pfeldman, podivilov, timothy |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 523.x (Safari 3) | ||
| Hardware: | All | ||
| OS: | All | ||
Kevin McCullough
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Gavin Sherlock
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)
<rdar://problem/5712838>
Timothy Hatcher
*** Bug 20308 has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
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>
Timothy Hatcher
*** Bug 40969 has been marked as a duplicate of this bug. ***
Timothy Hatcher
*** Bug 50239 has been marked as a duplicate of this bug. ***
Timothy Hatcher
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
*** Bug 54664 has been marked as a duplicate of this bug. ***
Alexander Pavlov (apavlov)
podivilov@chromium.org implemented JS pretty-printing a while ago.
Timothy Hatcher
How and where was this implemented? Was/is it V8 only? I don't see it in WebKit for Safari.
Pavel Podivilov
(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.