Hello, I'm the Test Manager for Visual C# and the Visual Studio Debugger.   During my career at MS, I've also worked on Win95, Visual Test, Visual J++ and Visual C++.

In addition to blogging about what my team is up to, I'll touch on some of the other stuff I have my fingers in:
- Various aspects of software quality
- Side-by-Side (for example, VS2003 SxS with VS2005 on the same machine).
MSDN Product Feedback
- Application Verifier, one of my favorite test tools

Which brings me to my first testing suggestion, AppVerifier.  If you haven't given it a try already, try running your app under AppVerifier.  If you are running on Windows XP or greater (the greater the better because more verifications are added to the OS on in later versions) you can almost immediately find bugs by running your app with this turned on.  For the “core“ set of verifications, the tool causes your app to fail fast when it does something wrong by AV'ing immediately instead of later down the line when the bad code is long gone from the scene.   These are the core verifications:

PageHeap:  Checks the heap for corruption and adds guard pages to the end of each allocation. This causes access violations when there are buffer overruns.
Locks:  Checks for errors in lock usage. This might cause access violations when errors are located.
Handles: Checks for handle errors. This might cause access violations when errors are located.

It can also help you make your app more secure.  See Mike Howard's article.

To get started:
Install the Applications Compatibilty Toolkit and run “appverif“ from the Start.Run.
2) S
et the verifications you want to turn on for your EXE.
3) You should run it under a debugger, so open your EXE in the Visual Studio Debugger (of course! :-) ) and set up your symbol and source paths.
4) F5
5) Test your app.

1)  With PageHeap on you will need lots of extra memory.  For VS2005 we turn on all the verifications and found 1GB is needed, although I'm sure you can get by with less depending on your app.
2)  As I mentioned, use the newest version of the OS.  I'd suggest Windows Server 2003 if you have it.  At a minimum you need Windows XP.
3)  If you turn on verifications that output to the log file, try “Break on Error”.  This will give you a call stack can you can immediately see who is causing the problem.

Also see Appverifer FAQ .

We use it internally and find a fair number of bugs, but it's the quality not the quanity that's important and AppVerifer can help identify those bad bugs that would otherwise reduce the stabilty of your app.

- Rusty Miller