Debugging on Mac OS X

To debug from within Xcode, you can use the WebKit workspace. Ensure that the Products and Intermediates locations for the workspace match those used by build-webkit by choosing File > Workspace Settings and clicking the Advanced button, selecting Custom, Relative to Workspace, and entering WebKitBuild both for Products and for Intermediates. Note that if you have specified a custom build location in Xcode preferences, then you don’t need to do this.

Debugging UIProcess

Follow the instructions on the debugging UIProcess page.

Debugging WebProcess

Debugging on Windows

  1. 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.

  2. 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.

  3. Set WebKit.vcproj's Debugging properties

    With the WebKit project selected, choose Project > Properties, then navigate to Configuration Properties > Debugging. Set the following options:

    Command
    $(PROGRAMFILES)\Safari\Safari.exe
    Environment
    WEBKITNIGHTLY=$(OutDir)

    Then click OK to close the properties dialog.

  4. 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.