[Windbg Script] Tracing MessageBox calls

In the past I worked on a support case where I needed to find out if some MessageBox from a C++ application was displayed and, if positive, what the message was. I got inconsistent answers whenever I asked the user, so I didn’t know if the MessageBox appeared or what the message was. It sounded…


[Windbg Script] Extracting Performance Monitor counters from .NET application

Have you ever had a situation where you find yourself debugging a dump from ASP.NET when suddenly you notice you forgot to get the Performance Monitor log?   If sometimes you face this situation, I have great news for you: this script shows you some of the main .NET Performance Monitor counters. It gets the…


[Windbg Script] Tracing API calls

This is a very simple script, yet powerful script. You can use it to see the APIs an application is using from your Windbg screen without using another tool. If you need more details from the APIs, just execute LogViewer.exe and open the .lgv file that is automatically created when you use this script.  …


[Windbg Script] Playing with Notepad

This is one of my “just for fun” scripts. It’s very simple and has some limitations, but it’s fun! What does it do? Open Notepad.exe then copy and paste a text on it or just write some stuff. After that, open the script and replace the StringsToFind and StringsToReplace with the strings you want to…


[Windbg Script] Retrieving queries/stored procedures from .NET application

Ok, you are debugging a .NET application. You need to find out the queries and stored procedures being executed from the threads accessing the database, but you don’t know how. . . Good news! It’s not a problem anymore! This script shows you all the queries or stored procedures associated with a SQLCommand or OracleCommand object….


[Windbg Script] Connections from Pool

If you are like me, you may forget the classes and namespaces you need to find out some specific information. Or maybe you forget the field names you need to look for. It happens to me when I need to take a peek at information from System.Data.SqlClient namespace, for example. This script retrieves specific information…


[Windbg Script] Playing with Minesweeper

First, this script is not really about cheating. It does that with Minesweeper, but there are several other possibilities using a bit more bytes that do a better job to fool the application. However, the point here is to show you how powerful the debugger is or, more precisely, the power you have when you…


[Windbg Script] Retrieving information from ASP

Have you ever had this situation: You need to get ASP information from an IIS process? If yes, you can use the DebugDiag tool to analyze your dump file.   Oh, I see… sometimes you use DebugDiag, but you need to manually debug the dump/application to get more information—for example, the ASP source code being…


[Windbg Script] Digging the Call Stack

Windbg has a lot of commands and command variations, so sometimes you may forget some of them, like when you need to dig a call stack to extract more information. Or maybe you remember the commands to get the call stack details, but you need to make sure you get the entire stack. Or yet…


Read Me

The purpose of this blog is to provide you with information that will help you during debugging sessions. The debugging toolbox I provide is a collection of Windbg scripts I created to help me on a daily basis. The collection expands whenever I develop a script to replace manual debugging.   The Windbg programming language…