What are the best debugging techniques available in visual studio 2008 to save you a lot of time finding the exact cause of the problem?

What are the best debugging techniques available in visual studio 2008 to save you a lot of time finding the exact cause of the problem?

+2


source to share


4 answers


The number one feature that I find useful, especially when debugging another user with a software bug, involves throwing exceptions.



see this MSDN link for more information.

+1


source


I tend to prefer using the Immediate window and conditional breakpoints. Walking the call stack is also a good idea to get some context for your code's execution.

When debugging data for data access, you can use the Text Renderer window to get the value of your sql query string literals without manually highlighting all the escape sequences (\ t, \ n, \ etc.).



Using System.Diagnostics.Debugger.Break () is sometimes useful or even required, but remember to cross it out of your code when you're done.

+1


source


I agree with coxymla, but other than that, I have to say that there is no automatic tool that can

"save a lot of time searching for the exact cause of the problem"

There are very valuable tools that help - rightly. But the search for root causes, etc. Will always match your skills, your knowledge and your ability to use the tools to the maximum extent possible.

0


source


Have a look at sourceindexing + symbolerver with scm supported. (at least for C ++).

When you write mini-copies, when your application crashes, you can run them in your view and you will get a source file pointing to the location of the crash, including a callstack, some of the available vars!

This is a really great feature!

0


source







All Articles