Browse by Tags
All Tags »
Tools (
RSS)
A few days I delivered a full-day session titled “Debugging .NET Applications” at the Sela Developer Practice . The session was packed and I was really happy to see lots of people interested in .NET debugging – this seems to be an area of incessant popularity. I only had one day to deliver lots of material – I basically tried to cram the entire .NET Debugging course I teach at Sela into a single day. We started with debugging basics such as dump files and symbols – and considering the dozens of ways...
The last session at the PDC that I’m attending is about incubation tools for debugging, from Microsoft Research. Debugging is hard and the process of finding the root cause is manual and therefore tedious and long. The formal debugging process – ask an expert, check the bug database, check the version history, reproduce the bug, trace in a debugger. [Some existing tools that help along the way are Visual Studio Test Impact analysis, Visual Studio Test Elements and Visual Studio Intellitrace (new...
Code Contracts are a mechanism coming out of incubation at Microsoft Research for expressing design intent when implementing an API. The idea is to specify assertions that are verified at runtime to ensure that callers provide proper information to your methods. There are ways to specify contractual information on methods – Contract.Requires and Contract.Ensures , and there are also interface contracts (for any implementation of the interface) and object invariants. Finally, there are automatic tools...
You can ask Windows to launch another process (typically a debugger) when launching a process of your choice. One use of this feature is to configure Calculator to launch whenever you launch Notepad, or configure Excel to launch whenever you launch Word. This is a great way to drive a colleague crazy. Another use of this feature is to attach a debugger to the startup sequence of a process that can’t be easily started from within the debugger. For example, if you’re debugging the startup of a Windows...
Today I had the pleasure of presenting at the IDCC (Israeli Developers Community Conference). This unique conference was organized by the community, for the community and the sessions were selected by members of the community. I’m also proud to say that my company, Sela Group , has sponsored the conference. Overall the day has been great with lots of interesting talks. My session, .NET Performance: Tales from the Field , was one of the only sessions I ever delivered that didn’t have any code at all...
The Microsoft Security Science Team released a debugger extension that performs automated crash dump analysis and assesses the security risk associated with the crash. It’s extremely simple to use—fire up WinDbg, open the crash dump (or debug the application until it crashes), load the debugger extension and execute the !exploitable command to receive an immediate risk assessment. I immediately wanted to try this thing out, so here’s what I did. I wrote a simple console application that reads user...
Windows 7 offers a built-in troubleshooting platform that consolidates the typical user’s support and troubleshooting needs into a single consistent user interface with dozens of specific troubleshooters for common problems. If you haven’t seen the Troubleshooting Platform in action yet, go ahead and type “troubleshooting” into your Windows 7 start menu and open the Troubleshooting control panel applet. You can try some of the troubleshooters now. I’ll wait here. One of the easiest ones to repro...
In the previous installment we’ve seen how tinkering with the prefetch settings on Windows XP improved the cold startup performance of a client application. Unfortunately, the improvement wasn’t significant enough and we were called in for another round of thinking. After looking at the virtual memory address space of the process we found out that there were many relocated DLLs. We could easily determine this with Process Explorer, which shows you the image base address and actual base address for...
A few months ago, Alon , Dima and I have visited a customer with a client application experiencing very slow cold startup times. In this post (and possibly another) I will look into some of the things we found out in the process. Some of the details have been slightly changed to protect the innocent, but the general findings might be useful nonetheless. Elsewhere there is some good reading on cold startup performance in general. First there’s Vance Morrison’s theoretical model . Claudio Caldato’s...
After reading Mike Taulty’s post “Metadata Classes – A Force for Good or Evil?” , I realized that this is something that I was highly annoyed with in the past, and never got a chance to write anything about. If you haven’t seen them yet, “metadata classes” as Mike refers to them are a way to extend the metadata of code that doesn’t belong to you. For example, in ASP.NET Dynamic Data you get a set of tool-generated types and can’t decorate them with attributes directly because these attributes...
Simian (Similarity Analyzer) detects duplicate code in almost every human readable text format. The primary case brought forward by the product webpage is that you can correct a bug in one place in the program, without knowing that the same buggy code was copy-pasted to another location in the program. But that’s just a tiny fraction of the scenarios where “reuse by copy-paste” detection can improve the quality of your code. Additionally, I can think of even more esoteric but interesting scenarios...
I blogged about wait chain traversal (WCT) a while ago – we’ve seen that it’s quite a useful tool for analyzing system-wide synchronization issues such as multi-process deadlocks, and might actually be useful for intra-process analysis as well. What I regretted ever since is that there was no Microsoft tool for displaying WCT information, except for some rarely-cooked MSDN samples. This comes to an end with the Windows 7 Resource Monitor. By the way, if you haven’t been introduced: Reader...
I gave a 3-hour presentation today on C++ debugging techniques, with a focus on production debugging. I’d like to share with you the demos I’ve shown during the session with a brief walkthrough so that you can repeat what I did in class. (I have intentionally omitted the debugger spew and any screenshots so that this still remains somewhat of an interesting challenge.) First of all, download the demo solution (30KB), unzip and open with Visual Studio 2008 (the code should work on Visual...
Yesterday was the second session in our series of courses for our instructors and consultants . It was my turn to be the lecturer, and I talked about performance measurement on Windows in general and using .NET in particular. In a pretty standard but significantly faster-paced session taken from the .NET Performance course , I've reviewed the CLR Profiler , the Visual Studio 2008 Profiler , performance counters as well as exposing your own performance counters, querying WMI information (I've...
How do you determine whether the memory issue you seem to be experiencing is a .NET memory leak or a native memory leak? Why is it even important? It's the first question I as a consultant would ask you if we were to talk over the phone regarding a high-memory problem you've having. It's extremely important because in most of the cases it narrows the scope of the problem and facilitates bringing the appropriate people, tools and resources for focusing on the task at hand. The process...
More Posts
Next page »