| 1 | | In order to be able to do source-level debugging of WebKit code from within Xcode, do the following:[[BR]] |
| 2 | | * [http://webkit.org/building/build.html Build WebKit] in Development configuration (you can use the `set-webkit-configuration` script to change configurations). By default, this will build the frameworks into WebKitBuild/Development. |
| 3 | | * Create an empty Xcode project. |
| 4 | | * Choose Project > New Custom Executable, choose the executable that you would like to debug (for example, /Applications/Safari.app), name the custom executable and click Finish. |
| 5 | | * In the new executable's info window, select the Arguments tab, and under ''Variables to be set in the environment'', add a variable named ''DYLD_FRAMEWORK_PATH'', specifying for its value the full path to the WebKit development build location (again, by default, this will end with WebKitBuild/Development). Close the executable info window. |
| 6 | | * Verify that the new executable is selected in Project > Set Active Executable. |
| 7 | | * Choose Debug > Tools > Shared Libraries. Change the Default Level for User Libraries from Default (External) to All. |
| 8 | | * Choose Debug > Debug Executable. |
| | 1 | = Debugging !WebKit With Xcode = |