Changes between Version 10 and Version 11 of Debugging With Visual Studio


Ignore:
Timestamp:
Mar 2, 2014 5:56:06 PM (8 years ago)
Author:
BJ Burg
Comment:

merge WK2 instructions

Legend:

Unmodified
Added
Removed
Modified
  • Debugging With Visual Studio

    v10 v11  
    3131= Debugging WebKit2 =
    3232
    33 You can attach a single debugger to more than one process. To do this, launch or attach to the first process, then use `Tools > Attach to Process…` or `Ctrl+Alt+P` to attach to the second process. Your breakpoints will apply to both processes.
     33(Ed. note: These instructions were written for VS2005 and are likely outdated)
    3434
    35 There are two ways to see which process the debugger is currently operating on, and to switch the current process: the Processes window and the Debug Location toolbar. You can open the Processes window using `Debug > Windows > Processes` or `Ctrl+Shift+Alt+P`. You can show the Debug Location toolbar using `View > Toolbars > Debug Location`.
     35 1. Make sure the '''Use WebKit2 for New Tabs''' option is enabled in Safari’s '''Debug''' menu
     36 2. Right after you tell Visual Studio to Run the version of Safari that you just built, hold down the Shift-Control-Alt keys
     37 3. A dialog should pop up to notify that you can now attach a debugger to the `WebProcess` — ''(Do not click OK yet!)''
     38 4. In Visual Studio select '''Attach to Process…''' in the '''Debug''' Menu.
     39 5. In the window that comes up, select the `WebKit2WebProcess` with the title "WebKit2WebProcess has launched", and Attach
     40 6. Go back to the dialog from Step 3 and click '''OK'''
    3641
    37 Visual Studio will always pause all processes (i.e., you can't pause just one process). Similarly, Visual Studio will always step all processes when using the Step In/Over/Out commands.
     42
     43You’re now debugging both the `UIProcess` and the `WebProcess`.  Your breakpoints in either should work accordingly.
     44
     45Alternatively, you can add a VS Toolbar Item to attach to the `WebProcess`.
    3846
    3947= Miscellaneous Tips =
     
    5866Note that you usually won't be able to pass a variable name as the parameter to `CFShow`, as the Immediate window will get confused and think you're specifying a symbol in `CoreFoundation.dll` rather than whatever code you're debugging. It's usually easiest just to pass the address of the object directly as above.
    5967
     68== Debugging Multiple Processes ==
     69
     70You can attach a single debugger to more than one process. To do this, launch or attach to the first process, then use `Tools > Attach to Process…` or `Ctrl+Alt+P` to attach to the second process. Your breakpoints will apply to both processes.
     71
     72There are two ways to see which process the debugger is currently operating on, and to switch the current process: the Processes window and the Debug Location toolbar. You can open the Processes window using `Debug > Windows > Processes` or `Ctrl+Shift+Alt+P`. You can show the Debug Location toolbar using `View > Toolbars > Debug Location`.
     73
     74Visual Studio will always pause all processes (i.e., you can't pause just one process). Similarly, Visual Studio will always step all processes when using the Step In/Over/Out commands.
     75
    6076== Inspecting WebKit2 API types ==
    6177