Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Visual Studio » Debugging   (RSS)

Write simple Debug helpers to help you debug and maintain your code

Much of my time is spent using the Visual Studio debugger examining code to figure out how it works and how to fix it. When stepping through a function, the values the function uses are very useful for code understanding. The debugger shows these values
Posted by Calvin_Hsia | 0 Comments

Examine .Net Memory Leaks

Writing programs using .Net is very productive. One reason is because much of memory management is “managed” for you. In C, C++ and other “native” languages, if you allocate memory, you’re responsible for freeing it. There were stopgap measures, like

Customize the display of types in the Debugger using Extension Methods and DebuggerDisplay Attribute

I was writing some code using System.Text.StringBuilder . : Dim sb As New StringBuilder( "Init SB String" ) At a breakpoint the debugger Locals Window shows + sb {System.Text.StringBuilder} System.Text.StringBuilder If I expand by clicking on the "+",
Posted by Calvin_Hsia | 6 Comments
Filed under: , ,

Dynamically attaching a debugger

Sometimes something goes wrong with your program and you want to investigate why. You can start Visual Studio, choose Debug->Attach to Process and choose the process you want to debug. (The dialog also allows remote debugging and choosing Native, Managed,
Posted by Calvin_Hsia | 3 Comments
Filed under: , ,

Customize the VS debugger display of your data

As a software developer, I spend much of my time looking at code, learning how it works, and figuring out how to modify or fix it. A very good tool to help examine code is the Visual Studio debugger. (Even if you’re not a hard core programmer, the following
 
Page view tracker