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.
Follow the instructions on the debugging UIProcess page.
From the command line:
Execute the debug-safari
or debug-minibrowser
script with the --target-web-process
option. It will start the debugger with WebProcess as the target and with command-line arguments that will make WebProcess run Safari or MiniBrowser as its client. At the debugger prompt, enter run
to start the process.
From Xcode:
Open the WebKit workspace and choose “All Source (target WebProcess)” from the Scheme pop-up menu in the toolbar, then choose Product > Run. If WebKit is already built, it is quicker to choose Product > Perform Action > Run Without Building
Open Source/WebKit/WebKit.vcxproj/WebKit.sln
You can open it in either Visual Studio 2010, or Visual C++ Express 2010.
If you get errors about not being able to find .props
files, run
update-webkit, then close and relaunch Cygwin and Visual Studio or Visual C++
Express.
Set WinLauncher as the solution's StartUp project
Select the WinLauncher project in the Solution Explorer, then choose Project > Set as StartUp Project. This will cause the project to turn bold in the Solution Explorer.
Launch the debugger
Choose Debug > Start Debugging.
Alternatively, you can debug layout tests with DumpRenderTree
Set DumpRenderTreeLauncher as your startup project, set the layout test as a command argument, and launch the debugger.
In DumpRenderTreeLauncher's properties, go to Configuration Properties->Debugging and set the Command Arguments field to the full path of the layout test you want to debug, see below: