Introducing Rodney Viana’s WinDbg Extension for .NET Debugging

| by Jonathan Allen Follow 465 Followers on Nov 08, 2013. Estimated reading time: 1 minute |

A note to our readers: You asked so we have developed a set of features that allow you to reduce the noise: you can get email and web notifications for topics you are interested in. Learn more about our new features.

When a .NET application fails in production the developer is often left with just a memory dump. Since Visual Studio cannot handle dumps, you have to instead look at a tool called WinDbg. This is often used with SOS.dll or Psscor4.dll, which are extensions that expose .NET specific details. Though powerful, these can be difficult to use so developers occasionally create their own extensions. Once such developer is Rodney Viana, who has just released netext 1.6.1 as an open source project.

An interesting feature of netext is the ability to query the heap using a SQL-like syntax. For example, say you wanted to see a list of recent web requests that failed. Since the HttpContext objects are cached you can look for failed queries using this syntax:

!wfrom -type *.HttpContext |
where ( ($contains(_request._url.m_String, "http:")) && (_response._statuscode != 0n200) )
select $addr(), _request._url.m_String, _response._statusCode

Here is a list of the supported commands:

Commands to Show Object Details

  • !wdo - Display ad-hoc objects or arrays from GAC or Stack
  • !wselect - Display ad-hoc fields (and level fields) for an object or for all item in an array
  • !wfrom - Perform SQL-like analysis of Heap objects enabling comparison, expression evaluation and indexed filtering.

Enumerate objects

  • !windex - index and display objects based in different filters like object with of type HttpContext
  • !wstack - dump unique stack objects
  • !wheap - list objects without indexing and show thottled heap sampling
  • !wgchandles - Dump GC root handles

Special Purpose

  • !wdict - Display dictionary objects
  • !whash - Display HashTable objects
  • !whttp - List HttpContext Objects
  • !wconfig - Show all .config file lines in memory
  • !wservice - List WCF service Objects
  • !weval - Evaluate expression list
  • !wclass - Show "reflected" class definition (fields, properties and methods)

Netext also supports functions for working with aggregation, strings, XML, arrays, and reflection.

Netext is offered under the GNU General Public License version 2. Though Rodney Viana is a Microsoft employee, this considered to be a personal project and is not supported by Microsoft.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you