Debugger Objects


The automation object model provides a Debugger object that allows you to control the Visual Studio debugger. A Debugger instance can be obtained through the DTE.Debugger property:

Dim debugger As Debugger debugger = DTE.Debugger


With a valid Debugger object, you can

  • Set breakpoints

  • Start and stop the debugger for a given process

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

  • Issue the Run to Cursor command to the debugger

  • 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:

Dim debugger As Debugger2 debugger = DTE.Debugger If debugger.CurrentMode <> dbgDebugMode.dbgRunMode Then     debugger.Go() End If





Microsoft Visual Studio 2005 Unleashed
Microsoft Visual Studio 2005 Unleashed
ISBN: 0672328194
EAN: 2147483647
Year: 2006
Pages: 195

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net