debug.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. $title = "Debugging WebKit";
  3. include("../header.inc");
  4. ?>
  5. <div class="mac-instructions">
  6. <h2>Debugging on Mac OS X</h2>
  7. <p>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 <code>build-webkit</code> 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&rsquo;t need to do this.</p>
  8. <h3>Debugging UIProcess</h3>
  9. <p>Follow the instructions on the <a href="debug-mac-uiprocess.html">debugging UIProcess</a> page.</p>
  10. <h3>Debugging WebProcess</h3>
  11. <ul>
  12. <li>
  13. <p>From the command line:</p>
  14. <p>Execute the <code>debug-safari</code> or <code>debug-minibrowser</code> <a href="/coding/scripts.html">script</a> with the <code>--target-web-process</code> 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 <code>run</code> to start the process.</p>
  15. </li>
  16. <li>
  17. <p>From Xcode:</p>
  18. <p>Open the WebKit workspace and choose &ldquo;All Source (target WebProcess)&rdquo; 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</p>
  19. </li>
  20. </ul>
  21. </div>
  22. <div class="windows-instructions">
  23. <h2>Debugging on Windows</h2>
  24. <ol>
  25. <li><p>Open <code>Source/WebKit/WebKit.vcxproj/WebKit.sln</code></p>
  26. <p>You can open it in either Visual Studio 2010, or Visual C++ Express 2010.
  27. If you get errors about not being able to find <code>.props</code> files, run
  28. update-webkit, then close and relaunch Cygwin and Visual Studio or Visual C++
  29. Express.</p>
  30. </li>
  31. <li><p>Set WinLauncher as the solution's StartUp project</p>
  32. <p>Select the WinLauncher project in the Solution Explorer, then choose Project >
  33. Set as StartUp Project. This will cause the project to turn bold in the
  34. Solution Explorer.</p>
  35. <img src="set-as-startup-project-vs2010.png">
  36. </li>
  37. <li><p>Launch the debugger</p>
  38. <p>Choose Debug > Start Debugging.</p>
  39. <img src="launch-debugger-vs2010.png">
  40. <li><p>Alternatively, you can debug layout tests with DumpRenderTree</p>
  41. <p>Set DumpRenderTreeLauncher as your startup project, set the layout test as a command argument, and launch the debugger.</p>
  42. <p>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: </p>
  43. <img src="set-debugging-properties-vs2010.png">
  44. </li>
  45. </ol>
  46. </div>
  47. <?php
  48. include("../footer.inc");
  49. ?>