This is something that I’m almost afraid to admit to. *sheepish grin*
I was debugging a DbDataReader Unit Test and all of a sudden it started to fail. After about 5 minutes of thrashing I saw that I had put the DbDataReader object into the Watch window (which was not pinned — therefore I could not see it). I was checking a value of the DbDataReader and working with it in the watch window. Well, I forgot to remove that watch, and as soon as the unit test started again, it bombed bout because as soon as the DbDataReader was available it attempted to perform some work on it (before the Read method was called). Therefore when we did call anything on the DbDataReader later in the game, it blew up because it had already thrown an exception in the watch window.
Ooops. ๐
Moral of the story: Make sure you delete your watch variables when you’re done. Oops. ๐ Perhaps I should be using the Auto’s window instead. ๐
Leave a Reply
You must be logged in to post a comment.