2

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

2

4 Answers 4

1

The number one feature I find useful, especially when debugging other people's buggy software, is turning on break on exceptions.

see this MSDN link for further information.

1

I tend to make liberal use of the Immediate window and conditional breakpoints especially. Walking up the Call Stack is also a good idea to get some context of your code's execution.

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

Using System.Diagnostics.Debugger.Break() is sometimes helpful or even required, but don't forget to strip the out of the code when you're done.

0

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

"save a lot of time finding the exact reason of the problem"

There are very valuable tools that help - right. But finding root causes, and the like will always be at most up to your skills, your knowledge AND your ability to use tools.

0

Look for sourceindexing + symbolserver with a supported scm. (at least for c++).

When you write minidumps when your app fails, you can start them in your ide, and you get the sourcefile pointing at the crash locaten including callstack an some available vars!

this is really a great feature!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.