Reputation: 7259
While debugging I constantly find myself adding
System.Web.HttpContext.Current.Request
or similar to QuickWatch Expression (Shift+F9)...
Is there a way to do this in C# via code (some attribute or similar)?
Upvotes: 1
Views: 407
Reputation: 11827
Here's a VS Macro that both adds the expression to the Watch window and open the QuickWatch window with it:
Sub WatchHttpRequest()
DTE.ExecuteCommand("Debug.AddWatch", "System.Web.HttpContext.Current.Request")
DTE.ExecuteCommand("Debug.QuickWatch", "System.Web.HttpContext.Current.Request")
End Sub
Upvotes: 1