andrew4582

Dump locals macro

Jan 1st, 2011
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.63 KB | None | 0 0
  1.     Sub DumpLocals()
  2.  
  3.         Dim outputWindow As EnvDTE.OutputWindow
  4.  
  5.         outputWindow = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput).Object
  6.  
  7.  
  8.  
  9.  
  10.         Dim currentStackFrame As EnvDTE.StackFrame
  11.  
  12.         currentStackFrame = DTE.Debugger.CurrentStackFrame
  13.  
  14.  
  15.  
  16.  
  17.         outputWindow.ActivePane.OutputString("*Dumping Local Variables*" + vbCrLf)
  18.  
  19.         For Each exp As EnvDTE.Expression In currentStackFrame.Locals
  20.  
  21.             outputWindow.ActivePane.OutputString(exp.Name + " = " + exp.Value.ToString() + vbCrLf)
  22.  
  23.         Next
  24.  
  25.     End Sub
Add Comment
Please, Sign In to add comment