Open a project
Each WebKit component -- JavaScriptCore, WebCore, and WebKit -- contains its own Xcode project. Open the project belonging to the component you want to debug.
Set the project's build products location
To find the WebKit you built, Xcode needs to know the build products location that build-webkit
used. You can set the build products location from the project's Info window.
Set the project's active build configuration
Xcode also needs to know the build configuration you used. You can set the active build configuration from the project's Build window.
Add a custom executable to the project
Choose any WebKit application you want to use for debugging. To use Safari, select /Applications/Safari.app.
Set the project's active executable
You can set the active executable from the project's Build window. Choose the executable you just added.
Close and re-open the project
This will force Xcode to discover generated source files, which output to your build products location, allowing you to set breakpoints in them.
Launch the debugger
In the Debugger window, click the "Debug" button.
See the Xcode Debugging Guide for more information on using Xcode to debug software on Mac OS X.
Open WebKit/WebKit/win/WebKit.vcproj/WebKit.sln
You can open it in either Visual Studio 2005, or Visual C++ Express 2005.
If you get errors about not being able to find .vsprops
files, run
update-webkit, then close and relaunch Cygwin and Visual Studio or Visual C++
Express.
Set WebKit.vcproj as the solution's StartUp project
Select the WebKit project in the Solution Explorer, then choose Project > Set as StartUp Project. This will cause the project to turn bold in the Solution Explorer.
Set WebKit.vcproj's Debugging properties
With the WebKit project selected, choose Project > Properties, then navigate to Configuration Properties > Debugging. Set the following options:
$(PROGRAMFILES)\Safari\Safari.exe
WEBKITNIGHTLY=$(OutDir)
Then click OK
to close the properties dialog.
Launch the debugger
Choose Debug > Start Debugging.
It is also recommended that you follow the instructions to configure Visual Studio to use Apple's Safari for Windows symbol server. This will give Visual Studio the information it needs to provide reliable backtraces when pausing in the debugger or when a crash occurs.