Visual Studio Debugger FAQ

Introduction This FAQ can be used to narrow down the problems associated with debugging any type of solution using any version of Visual Studio from 7.0 to 2008.   Please be aware that this is very much a work-in progress.  Please continue to refer to it as it is updated.   Prerequisites ·         What steps…

1

Debugger Tips, Tricks and Tools #12

I’ve had loads of people ask me the question: “Is there any way to step into a function without having to bother stepping into all the properties that might have to be executed as parameters before getting to what I’m really interested in?” The standard answer for Visual Studio 2005 and Visual Studio 2008 has…

3

Why does Visual Studio require debugger symbol files to *exactly* match the binary files that they were built with?

Recently a coworker of mine lost the symbol file for one of his binaries.  Because he needed to debug that binary, getting those symbols back was of utmost importance since debugging without them is near impossible.  He decided to try and use a symbol file from a previous build whose sources exactly matched.  Much to his…

1

Debugger Tips, Tricks and Tools #11

More fun with labelling breakpoints Back in my first Debugger tips post I provided some macros that allow you to tag a set of breakpoints with a string so that they can easily be enabled or disabled from the command window.  Well, just for kicks, I decided to expand on that notion a bit and made…

1

Debugger Tips, Tricks and Tools #10

Create a one-step operation to attach to a process If you find your debugging session typically involves attaching to a specific process you can save yourself some time in VS 2005 by creating a macro to do it for you. Choose Tools->Macros->Record Temporary Macro Choose Tools->Attach to Process and choose the process you want to attach…

1

Debugger Tips, Tricks and Tools #9

Making native array viewing easier with Enhanced DataTips I’m back from vacation, and have a new found respect for people (mostly US wives/women, I presume) that slave all day over preparing a Thanksgiving meal and then cleaning it all up.  Yep, I did the whole turkey, potatoes, yams, corn, etc. thing this year for me and my kids.  By…

0

Debugger Tips, Tricks and Tools #8

Noisy breakpoints! Ok this feature has been around for a long time, but it’s really almost impossible to discover on your own.  Scott Nonnenberg asked me to remind him out to do this yesterday and I thought HEY good idea for a tip!  Here’s what you do: Open the Windows Control Panel If you are in Category View…

1

Debugger Tips, Tricks and Tools #7

Moving tracepoints and breakpoints around I have found the addition of tracepoints in Visual Studio 2005 extremely useful, allowing me to debug issues that have normally been pretty difficult to deal with.  For example, UI debugging often involves breaking into code that was invoked due to the receipt of a WM_PAINT message.  In the pre-tracepoint world,…

2

Debugger Tips, Tricks and Tools #6

Create an Object ID to keep track of an object while debugging In yesterday’s tip I hinted at another new feature of the debugger specially designed for C# and J# programmers.  This is the ability to create an Object ID  for any particular object during your debugging session, no matter what your current context is.  In…

5