Skip to content

Instantly share code, notes, and snippets.

@mattwarren
Last active June 12, 2023 14:22
Show Gist options
  • Star 25 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save mattwarren/5f1be63ab0babd65b44a910b03abc474 to your computer and use it in GitHub Desktop.
Save mattwarren/5f1be63ab0babd65b44a910b03abc474 to your computer and use it in GitHub Desktop.
Tools built on top of CLRMD - that replace functionality of WinDBG

Criteria:

The List

✅ = definately using ClrMD

Also see this Twitter thread

  • DumpMiner (GitHub) ✅
    • UI tool for playing with ClrMD
  • SuperDump (GitHub) ✅
    • A service for automated crash-dump analysis (presentation)
  • msos (GitHub) ✅
    • Command-line environment a-la WinDbg for executing SOS commands without having SOS available.
  • DebugDiag
    • The DebugDiag tool is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or memory fragmentation, and crashes in any user-mode process (now with 'CLRMD Integration')
  • MemoScope.Net (GitHub) ✅
    • A tool to analyze .Net process memory: it can dump an application's memory in a file and read it later. The dump file contains all data (objects) and threads (state, stack, call stack). MemoScope.Net will analyze the data and help you to find memory leaks and deadlocks
  • dnSpy (GitHub) ✅
    • .NET debugger and assembly editor
  • TUNE (GitHub) ✅
    • The Ultimate .NET Experiment (Tune) as its purpose is to learn .NET internals and performance tuning by experiments with C# code.
  • SharpLab (GitHub) ✅
  • MemAnalyzer (GitHub) ✅
    • is a command line memory analysis tool for managed code. It can show which objects use most space on the managed heap just like !DumpHeap from Windbg without the need to install and attach a debugger.
  • Shed (GitHub) by https://twitter.com/s4tan
    • Shed is an application that allow to inspect the .NET runtime of a program in order to extract useful information. It can be used to inspect malicious applications in order to have a first general overview of which information are stored once that the malware is executed. Shed is able to:
      • Extract all objects stored in the managed heap
      • Print strings stored in memory
      • Save the snapshot of the heap in a JSON format for post-processing
      • Dump all modules that are loaded in memory
  • netext (GitHub) ✅
    • WinDBG application that makes .NET debugging much easier as compared to the current options: sos or psscor


Also

http://labs.criteo.com/2017/09/extending-new-windbg-part-1-buttons-commands/ http://labs.criteo.com/2018/01/extending-new-windbg-part-2-tool-windows-command-output/

https://github.com/kevingosse/windbg-extensions

https://github.com/rodneyviana/netext

Question: what remaining SOS commands need to be ported to Linux/OS X #8363

ObjectLayoutInspector by Sergey Teplyakov:

There is no official documentation about fields layout because the CLR authors reserved the right to change it in the future. But knowledge about the layout can be helpful if you're curious or if you're working on a performance critical application.

How can we inspect the layout? We can look at a raw memory in Visual Studio or use !dumpobj command in SOS Debugging Extension. These approaches are tedious and boring, so we'll try to write a tool that will print an object layout at runtime.

@chrisnas
Copy link

Working with Kevin Gosse, I've published the WinDBG extension + UI tool corresponding to the task/thread pool/timers investigations detailed in our blog - https://github.com/chrisnas/DebuggingExtensions

@mattwarren
Copy link
Author

@chrisnas, sorry I completely missed your comment!

Thanks for the info, when/if I get round to doing a blog post on this I'll mention your extensions, they look interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment