[webkit-help] Stepping into webkit code in Xcode debugger

Dan Wood dwood at karelia.com
Thu Jun 19 17:02:34 PDT 2014


So I was able to get my app to build by cleaning out my build folder completely and rebuilding.

So I am linking to WebKit.framework at the absolute path of /build/Debug/WebKit.framework, and I have set up DYLD_FRAMEWORK_PATH in my scheme to be /build/Debug …

but running my app, breaking downstream of some WebKit code, I click on a frame in the backtrace and even though it appears black text with a blue “user” icon, I’m not seeing any source code.

Anybody think of something I’ve messed?  I’ve only been using Xcode for about 13 years, so there’s probably some detail I’ve missed :-)

Thanks,

Dan




On Jun 18, 2014, at 7:58 PM, Benjamin Poulain <benjamin at webkit.org> wrote:

> On 6/18/14, 7:15 PM, Dan Wood wrote:
>> Hi folks, I haven’t been on the WebKit lists for several years!
>> 
>> I’m trying to track down some weird behavior with our app (Sandvox)
>> which makes heavy use of WebKit editing.  Many years ago we used to
>> have a TOT build of WebKit that we would link to and embed in our
>> app, but for quite a while, we haven’t needed to do that.
>> 
>> So I’m kind of rusty about getting into the internals of WebKit!
>> 
>> I would like to be able to run our app in Xcode, and then step into
>> Xcode, and have the debugger find the source code to the WebKit,
>> WebCore, etc. files.  I’d be OK with either having a version of the
>> source code that corresponds to the system-installed framework… or
>> what I started was to build webkit, but now I’m not sure what the
>> next step is.
>> 
>> I’ve built webkit with build-webkit --debug and now it’s in my /build
>> directory.  (That’s not the build directory where my app and
>> supporting frameworks are built; I wasn’t having any luck getting
>> set-webkit-configuration to work.)
>> 
>> Any suggestions for my next step, to get my app’s Xcode workspace to
>> recognize my built webkit, and of course link to it?  I assume by
>> setting the DYLD_FRAMEWORK_PATH environment variable to /build/Debug
>> since that is where the built WebKit.framework lives.  Is that
>> right?
> 
> Yep, updating DYLD_FRAMEWORK_PATH should be enough to link with your custom WebKit.
> 
>> I’m also a bit stuck because ever since I built WebKit, I’m now
>> unable to build my app because for some reason it’s not finding
>> <WebKit/WebKit.h> for #import-ing anymore.  Any ideas how the
>> building scripts might have messed up the include paths in Xcode?  I
>> added a -v to the clang statement and I am seeing this directory in
>> the #include <...> search list:
>> 
>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks
>> (framework directory)
>> 
>> And that directory seems fine.  So it’s not clear why WebKit/WebKit.h
>> wouldn’t be found any more.
>> 
>> Any clues that anybody might offer?
> 
> That seems unrelated to your build of WebKit, I don't see how building your own framework could have messed that up.
> 
> Are you still including the WebKit framework in your project?
> 
> Benjamin
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-help


--
Dan Wood
dwood at karelia.com
Twitter: http://twitter.com/danwood
Karelia Software — Sandvox for the Mac
http://www.karelia.com/

"Those who can make you believe absurdities can make you commit atrocities."
Voltaire



More information about the webkit-help mailing list