Bug 3643 - Website provides no guidance on debugging
Summary: Website provides no guidance on debugging
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Enhancement
Assignee: Robert Blaut
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-21 22:58 PDT by Curt Arnold
Modified: 2008-08-21 19:26 PDT (History)
1 user (show)

See Also:


Attachments
Fix for the issue (93.85 KB, patch)
2008-07-23 05:15 PDT, Robert Blaut
eric: review-
Details | Formatted Diff | Diff
updated fix reflecting review comment (1.13 KB, patch)
2008-07-27 13:39 PDT, Robert Blaut
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curt Arnold 2005-06-21 22:58:54 PDT
It would be helpful if the web site had a "Debugging WebKit" page that gave strategies for debugging.  For 
example, suggested approaches for watching JavaScript execution, page loading, etc.
Comment 1 Joost de Valk (AlthA) 2005-06-23 10:03:28 PDT
i agree.
Comment 2 Trey Matteson 2005-07-26 23:34:36 PDT
How about just the fact that you have to create a custom executable to run Safari (or some other app) 
under the debugger?  I don't think that is very obvious - or maybe there is some better way that I didn't 
discover.
Comment 3 Joost de Valk (AlthA) 2006-02-08 12:20:51 PST
This should be written by someone, thinking about bdash / MacDome / mjs here :)
Comment 4 David Kilzer (:ddkilzer) 2006-02-26 06:48:00 PST
There is a web page on the wiki that describes how to do this:

http://wiki.opendarwin.org/index.php/WebKit:Debugging_WebKit_with_Xcode

This page should be linked from somewhere on http://webkit.opendarwin.org/.
Comment 5 Sam Weinig 2006-03-16 07:35:51 PST
While then wiki page does explain how to set up the debugging enviornment, it would be nice to have a list of some useful techniques for this codebase.  This might include detailing how to print out String values and some of the debug mode only methods.
Comment 6 Robert Blaut 2008-07-23 05:15:36 PDT
Created attachment 22449 [details]
Fix for the issue

Main part of the bug was fixed long time ago by creating a page: http://webkit.org/building/debug.html

My patch extend the info by adding link to Xcode Debugging Guide as requested in comment #5.
Comment 7 Eric Seidel (no email) 2008-07-24 16:05:40 PDT
Comment on attachment 22449 [details]
Fix for the issue

+<li><p>Study <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeDebugging/index.html">Xcode Debugging Guide</a></p>
+<p>Xcode Debugging Guide contains describes the Xcode debugging facilities and the recommended debugging techniques.</p>
+</li>

Would be better said as:

+<li><p>See the <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeDebugging/index.html">Xcode Debugging Guide</a> for more information on using XCode to debug software on Mac OS X.</p>
+</li>
Comment 8 Robert Blaut 2008-07-27 13:39:09 PDT
Created attachment 22509 [details]
updated fix reflecting review comment
Comment 9 Mark Rowe (bdash) 2008-07-28 00:35:41 PDT
Comment on attachment 22509 [details]
updated fix reflecting review comment

r=me, though "XCode" should be "Xcode".
Comment 10 Curt Arnold 2008-07-28 01:05:11 PDT
At the time of the original bug filing, there was not an available (at least outside of Apple) JavaScript debugger, so trying to track down deviations in script execution between WebKit and other browsers would have involved building WebKit (reasonably documented), running under a debugger and finding the appropriate places to set breakpoints to monitor execution (both daunting for somebody not already intimate with the code). 

http://webkit.org/building/debug.html likely adequately addresses getting WebKit running under a debugger, but does not address the other issue mentioned in the original bug report of appropriate breakpoints or other techniques to start monitoring the internals.  The article addresses how to load WebKit under a debugger, but doesn't really address effective debugging techniques.

That may be of less importance now since there are (apparently) JavaScript debuggers for WebKit, but there is no mention of their existence on this page other than the non-obvious link to the obsolete Drosera.   http://developer.apple.com/internet/safari/faq.html#anchor14 does tell how to enable Web Inspector in Safari, but a web search will yield a lot of other hits that predate Web Inspector.

To address the original motivation for the bug, the page should, at least, mention the integrated JavaScript debugger and tell how to enable it or provide an appropriate link.


Comment 11 Mark Rowe (bdash) 2008-08-21 19:26:21 PDT
Please re-open a new bug report for any further improvements to the website that you would like to see. The patch associated with this bug has been landed, so this will be closed.