Bug Vanquisher

21 October 2009

The Story of System.IO.FileNotFoundException

Filed under: Tips — Tanveer Badar @ 1:37 PM

‘Impaled by my own sword’, ‘shot myself in the foot’ would be some fine explanations for this exception. Ages ago, I checked ‘break on first chance exception’ for Debug > Exceptions > System.IO.FileNotFoundException. Then, I spent 30 minutes wondering and arguing with others why there was this exception when my code was doing exactly what it should have been doing and nothing changed.

It was long before I remembered to check this setting. So, next time you are bitten by some unexplained exception better see if it is a first chance catch and whether you are catching it as such. Setting is global in VS and persists across projects.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: