Enable Debugging in Web.Config

Versions:  2008,2010Published:  12/14/2010Code:  vstipProj0026   If you have ever created a web project in Visual Studio then you have undoubtedly encountered this dialog:     A quick read tells you that it will modify the Web.config file to enable debugging:     There are a couple of things to point out here: 1.  You can…

2

Debug Executable Without Using Attach to Process

Keyboard:  CTRL + SHIFT + OMenu:  File -> Open Project/Solution; File -> Add -> New ProjectVersions:  2008,2010Published:  10/27/2010Code:  vstipDebug0034     Okay, so the full title here is “Debug Your Executable Without Using the Traditional ‘Attach to Process’ Menu Items”  but that was way too long for me so I just shortened it up a…

0

Make Object ID

Command:  DebuggerContextMenus.AutosWindow.MakeObjectIDVersions:  2008,2010Published:  3/4/2010Code:  vstipDebug0015   Ever want to track an object even if it is out of scope?  How about see if an object has been garbage collected?  Well, you can do it with the Object ID!  And how do you get one of these amazing things?  Simple, just follow these steps:   Set…

4

Import and Export DataTips

Menu:  Debug -> Export DataTips.; Debug -> Import DataTips Command:  Debug.ExportDataTips.; Debug.ImportDataTips Versions:  2010Published:  3/2/2010Code:  vstipDebug0013     If you have DataTips (pinned or floating) you can import and export them!  How?  Just go to Debug -> Import (or Export) DataTips.   When you export the DataTips they are exported as XML so you can…

2

DataTip Value from the Last Debug Session

Versions:  2010Published:  2/26/2010Code:  vstipDebug0012   Now let me show you something seriously cool you can do with DataTips:   Assuming you have pinned DataTips and you are in edit mode:   You can view the values from the last debug session by simply putting your mouse over the pin in the Margin:

3

Using CTRL + ALT + B to Open the Breakpoints Window

Keyboard:  CTRL + ALT + B Menu:  Debug -> Windows -> Breakpoints Command:  Debug.BreakpointsVersions:  2008,2010Published:  2/20/2010Code:  vstipDebug0011   Want to get the Breakpoints Window up fast?  Just use CTRL + ALT + B to open it up or, if it already open, to give it the focus.

0

Setting a Tracepoint in source code

Command:  EditorContextMenus.CodeWindow.Breakpoint.BreakpointWhenHitVersions:  2008,2010Published:  2/7/2010Code:  vstipDebug0010   Most everyone knows what a Breakpoint is but, since Visual Studio 2005, we have had Tracepoints as well.  Unlike Breakpoints, Tracepoints give you the opportunity to unobtrusively print out information during (or after) application execution.  This tip will show you how to use the IDE to create Tracepoints but…

0

Setting a Tracepoint in the Call Stack Window

Command:  EditorContextMenus.CodeWindow.Breakpoint.InsertTracepointVersions:  2008,2010Published:  2/6/2010Code:  vstipDebug0009   In a previous tip I showed you a classic technique of setting a Breakpoint in the Call Stack Window.  The only problem with that is Breakpoints tend to be somewhat intrusive if all you want is information.  So I thought it would be fun to show how to set…

0

Setting a Breakpoint in the Call Stack Window

Keyboard:  F9 (toggle Breakpoint)Menu:  Debug -> Toggle BreakpointCommand:  Debug.ToggleBreakpointVersions:  2008,2010Published:  2/5/2010Code:  vstipDebug0008   This tip has been around a long, long time and yet people still don’t seem to know about it.  So.for your enjoyment we present an Old School tip today:   First set a Breakpoint deep in series of calls to get a…

1

Adding comments to a DataTip

Versions:  2010Published:  2/4/2010Code:  vstipDebug0007   You can now add comments to your DataTips Sometimes you just want to make a comment to remind yourself about something in a DataTip (pinned or floating) and now you can!  Here’s how you do it: Enter Debug Mode Put your mouse pointer over a variable in the current scope;…

2