Windows has a pretty useful “Resource Monitor” console which could be reached (among other ways ways) from your Windows Task Manager’s Performance tab. Recently I encountered a problem where my NetBeans Platform App was hanging on startup. I wanted to check the CPU and Memory status of my machine using the Windows Task Manager to find some clue. Both looked OK, which suggested that some sort of I/O is taking place (or trying to take place). Then I noticed the “Resource Monitor…” button at the bottom of the “Performance” tab.
Clicking this button takes you to the “Resource Monitor” console which has this nifty little feature called “Analyze Wait Chain” which you can launch by using the right click menu on the process that you want to analyze.
Lo and behold my NetBeans platform app was stuck since it was waiting for some heavy Network I/O to finish (as shown in the screenshot above)
Ofcourse this tool can be used for any application running on your Windows 7 machine but it really came in handy when trying to quickly figure why my NetBeans App is hanging wihout having to profile the app. So now I can have a look at my code specifically targeting the Network I/O stuff (opening HTTP URL connections etc.) and try to figure out whats going wrong.
Here’s another blog entry about this feature.