Bug 67102 - Update Debugging on Mac OS X instructions for Safari 5.1/WebKit 2
Summary: Update Debugging on Mac OS X instructions for Safari 5.1/WebKit 2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks: 66596
  Show dependency treegraph
 
Reported: 2011-08-28 21:30 PDT by Daniel Bates
Modified: 2012-01-19 12:13 PST (History)
8 users (show)

See Also:


Attachments
Work-in-progress patch (266.69 KB, patch)
2011-08-28 21:55 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (159.29 KB, patch)
2012-01-12 12:15 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Screenshot of debug.html (400.26 KB, image/png)
2012-01-12 12:17 PST, Daniel Bates
no flags Details
Screenshot of debug-mac-uiprocess.html (438.87 KB, image/png)
2012-01-12 12:18 PST, Daniel Bates
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2011-08-28 21:30:31 PDT
Update the Mac OS X instructions on <http://www.webkit.org/building/debug.html> to explain how to debug Safari 5.1/WebKit 2.

See <https://trac.webkit.org/wiki/Debugging%20the%20WebKit2%20Web%20Process>.
Comment 1 Daniel Bates 2011-08-28 21:55:48 PDT
Created attachment 105458 [details]
Work-in-progress patch

Work-in-progress patch

I took the "attach to WebProcess" instructions on <https://trac.webkit.org/wiki/Debugging%20the%20WebKit2%20Web%20Process> as inspiration for these updated instructions. In particular, I added WebProcess.app as the custom executable in the WebCore project and made Xcode wait for WebProcess.app to launch. Then ran run-safari to launch Safari. 

I am not so happy with this setup since it alternates between Xcode and the command line.
Comment 2 Daniel Bates 2012-01-12 12:15:22 PST
Created attachment 122285 [details]
Patch
Comment 3 Daniel Bates 2012-01-12 12:17:13 PST
Created attachment 122286 [details]
Screenshot of debug.html
Comment 4 Daniel Bates 2012-01-12 12:18:23 PST
Created attachment 122287 [details]
Screenshot of debug-mac-uiprocess.html
Comment 5 Eric Seidel (no email) 2012-01-19 10:56:46 PST
Comment on attachment 122285 [details]
Patch

This seems OK to me.  Certainly better than the very outdated instructions we have now.
Comment 6 WebKit Review Bot 2012-01-19 12:04:00 PST
Comment on attachment 122285 [details]
Patch

Clearing flags on attachment: 122285

Committed r105432: <http://trac.webkit.org/changeset/105432>
Comment 7 WebKit Review Bot 2012-01-19 12:04:07 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 mitz 2012-01-19 12:12:13 PST
(In reply to comment #1)
> Created an attachment (id=105458) [details]
> Work-in-progress patch
> 
> Work-in-progress patch
> 
> I took the "attach to WebProcess" instructions on <https://trac.webkit.org/wiki/Debugging%20the%20WebKit2%20Web%20Process> as inspiration for these updated instructions. In particular, I added WebProcess.app as the custom executable in the WebCore project and made Xcode wait for WebProcess.app to launch. Then ran run-safari to launch Safari. 
> 
> I am not so happy with this setup since it alternates between Xcode and the command line.

There is a more streamlined way to do this now that bug 75444 is fixed. You can have create a scheme whose executable is WebProcess and pass it the command-line options to launch the client (the UI process). The arguments look something like
    "$(BUILT_PRODUCTS_DIR)/WebKit2.framework/WebKit2" -type webprocess -client-executable /Applications/Safari.app/Contents/MacOS/Safari
and the environment should contain
    DYLD_INSERT_LIBRARIES=$(BUILT_PRODUCTS_DIR)/WebProcessShim.dylib
Comment 9 Eric Seidel (no email) 2012-01-19 12:13:19 PST
(In reply to comment #8)
> (In reply to comment #1)
> > Created an attachment (id=105458) [details] [details]
> > Work-in-progress patch
> > 
> > Work-in-progress patch
> > 
> > I took the "attach to WebProcess" instructions on <https://trac.webkit.org/wiki/Debugging%20the%20WebKit2%20Web%20Process> as inspiration for these updated instructions. In particular, I added WebProcess.app as the custom executable in the WebCore project and made Xcode wait for WebProcess.app to launch. Then ran run-safari to launch Safari. 
> > 
> > I am not so happy with this setup since it alternates between Xcode and the command line.
> 
> There is a more streamlined way to do this now that bug 75444 is fixed. You can have create a scheme whose executable is WebProcess and pass it the command-line options to launch the client (the UI process). The arguments look something like
>     "$(BUILT_PRODUCTS_DIR)/WebKit2.framework/WebKit2" -type webprocess -client-executable /Applications/Safari.app/Contents/MacOS/Safari
> and the environment should contain
>     DYLD_INSERT_LIBRARIES=$(BUILT_PRODUCTS_DIR)/WebProcessShim.dylib

Sounds useful.

Could we check in such a scheme into the repo?