Using VS2008..To start debugging depending on my mood i'll either attach to process and hit break points that way or i'll place System.Diagnostics.Debugger.Break() in a relevant place in the code and start debugging when it breaks at that point.
The latter being necessary sometimes I find!
Not talking about F5 --> running in debug mode for a second..
System.Diagnostics.Debugger.Break();
Questions :
Q) I'm curious as to the minor differences between each option?
Q) What are the benefits and drawbacks of using each?
I'll start it off..
Debugger.Break() drawback = forgetting about Debugger.Break()'s and leaving them in there!
Debugger.Break() benefit = Start debugging exactly where you want without hitting other unecessary breakpoints that may still be in the code which would be hit if attached to process.
Pre-empt the haters
I'll just pre-empt the haters that will undoubtedly say if i'm using Debugger.Break() I'm not understanding the correct way of debugging.
I'm just trying to start a conversation here as I believe there are different ways of debugging depending on the circumstances.
-- Lee