Debug without a Debugger
Developer, know thy environment!
If you develop software and don’t have TaskManager (or some other CPU indicator) minimized at your task tray – you’re missing out. If you have the feeling that “whenever something goes wrong with your app – you’ll know and then debug it” – you’re just wrong.
We need all the data you need, to save time on finding the bugs and performance issues. This trivial little 16X16 icon can tell you so much about your app – it’s amazing. When does you app spike in CPU? Does it have a constant “CPU overhead”? Does your normal environment have such overhead? When your app should be in 100% cpu – does it take less? Does it take exactly 50% (only one core is at full CPU, other is almost idle)?
Those questions are answered without even having to ask them.
And that’s just that lame TaskManager. Heard about ProcessExplorer?
A lot was said about this wonderful application, and I won’t glorify it further, other than to say that it’s probably the first thing I download and run on a new machine.
Now, as a developer – you should know the ins and outs of ProcessExplorer; again – for the information you can get. I/O graph and memory usage and physical memory usage, all at the tips of your task tray. This is how I work:
You get the CPU graph (history, actually); memory commit history; I/O history and Physical memory usage history.
Well, actually, this is how I work:
The transparent graph is DUMeter, an application which monitors my network. I’ve used it for so long that I can’t properly work on a machine without it floating there.
//----- Part two
Now, the real gains you get form ProcessExplorer are the ever so simple readings you get on a managed app. The CLR exposes lots of performance counters, and ProcExp just collects them all in a great, readable format.
Periodically – look at the amount of exceptions in you app. Maybe it’ll surprise you. Look at the amount of marshaling. Look at the Managed Heaps. Maybe something’s off. Just look.
Btw, running on Vista and up, you may need to run ProcExp as Admin to see the .Net tab. You can re-launch it as admin right from the File menu: