Debugger Objects

The automation object model provides a Debugger object that enables you to control the Visual Studio debugger. You can obtain a Debugger instance through the DTE.Debugger property.

Dim debugger As EnvDTE.Debugger
debugger = DTE.Debugger

With a valid Debugger object, you can do the following:

Image Set breakpoints

Image Start and stop the debugger for a given process

Image Control the various execution stepping actions supported by the debugger, such as Step Into, Step Over, and Step Out

Image Issue the Run to Cursor command to the debugger

Image Query the debugger for its current mode (for example, break mode, design mode, or run mode)

The following code starts the debugger if it isn’t already started.

Debugger2 debugger = (Debugger2)_applicationObject.Debugger;

If (debugger.CurrentMode != dbgDebugMode.dbgRunMode)
{
    debugger.Go();
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset