Debugging startup code of services and COM servers

New article on my web site: Debugging startup code of services and COM servers


Debugging the startup code of a service or an out-of-process COM server usually looks like a difficult task, especially if the service/server is running under a non-administrative user account. But in practice, there is a number of tools and techniques that can make this task much easier – almost as easy as debugging an interactive application.

StartDbg

New tool on my web site: StartDbg


StartDbg is a small tool that simplifies debugging of the startup code of services and COM server applications, even if they are running under non-administrative user accounts. In brief, it suspends the service or the COM server process for a predefined period of time, and allows us to attach debugger to the process while it is suspended. For additional information about the motivation behind creating this tool, take a look at this article.


 

ClrDump updated

ClrDump has been updated.


New features:



  • Additional command line parameters for clrdump.exe that allow to control the size of the minidump

  • New API function, SetFilterOptions, that allows to control various aspects of the filter’s functionality (currently it allows to specify whether to terminate the application immediately after the minidump has been created (the default), or pass control to the default exception handler provided by the operating system (which will usually report the error to the user via the standard Windows Error Reporting dialog and/or launch the registered just-in-time debugger)

 

ClrDump – Create small minidumps of .NET applications

New tool on my web site: ClrDump (Beta)


ClrDump is an experimental set of tools that allow to produce small minidumps of managed applications. In the past, it was necessary to use full dumps (very large in size) if you needed to perform post-mortem analysis of a .NET application. ClrDump can produce small minidumps that contain enough information to recover the call stacks of all threads in the application. It supports .NET runtime versions 1.1 and 2.0.


 

WinDbg the easy way

New article on my web site: WinDbg the easy way


This article introduces CDB debugger as an effective complement to Visual Studio debugger for various advanced debugging tasks. It shows how to install and configure CDB, and how to use its command line options and commands for retrieving useful information about the internal state of the debuggee – without interrupting the main debugging session in Visual Studio.


 

SymGetEx – Automatic symbol server support for Visual C++ 6.0 debugger


New tool on my web site: SymGetEx 1.0


SymGetEx is an addition to Visual Studio 6.0, which allows Visual C++ debugger to automatically download symbols from symbol servers. With automatic symbol server support, it is easy to keep system symbols up-to-date, regardless of the number of system updates and hotfixes installed on the computer. In turn, good symbols for system DLLs help you get complete and informative call stacks when debugging your applications.

In the process of downloading symbols, SymGetEx provides detailed progress reports, which help to troubleshoot network failures and various symbol server issues. SymGetEx also allows to reduce unnecessary network traffic by maintaining the list of modules whose symbols should not be downloaded from the symbol server (exclusion list).

SymGetEx allows to enable or disable symbol server access on the fly, ensuring that the debugger uses symbol server only when it is really needed, and does not consume computing resources at other times.

Debugging custom filters for unhandled exceptions

New article on my web site:
Debugging custom filters for unhandled exceptions

This article shows how to debug custom filters for unhandled exceptions, and how to ensure that
our filter is always properly registered (which sometimes is not easy to do, especially if other components
of the application want to register their own filters). We will also explore how the operating system
registers and calls custom filters, and what system components may want to utilize custom
filters for their own purposes (and thus interfere with our own filters).

Excluding modules from symbol server search

I have added a new category to my web site – Debugging Tips:
http://www.debuginfo.com/tips.html

Here is the first tip:
http://www.debuginfo.com/tips/symsrvexlist.html

This tip shows how to improve the startup time of our debugging
sessions by excluding some modules from symbol server search.
It can be especially useful for applications that use 3rd party
components whose symbols are not available on Microsoft symbol
server.