I have being trying to debug my program which is around couple of hundreds lines of code, I have been trying hard to debug the program properly, each and every control of the program leaves blocks, starts from different point whenever I press f11 to see each and every step of my co开发者_如何学Pythonde,
Is there is any better approach to do debugging properly by using some other tools.
You can get VS to stop when exceptions are thrown - Debug -> Exceptions. Then tick 'Thrown' for CLR Exceptions. http://msdn.microsoft.com/en-us/library/d14azbfh.aspx
You can also put Breakpoints against lines in code. Just click in the left margin or go to Debug -> Windows -> Breakpoints.
I personally like this series of articles about debugging: http://blogs.msdn.com/b/brunoterkaly/archive/2009/02/08/the-art-of-debugging-a-developer-s-best-friend-intro-lesson-1.aspx But there is a lot more turorials on the net. It is worth researching. When I started programming, I learned that knowing your debugger well can save a lot of time :)
精彩评论