Windbg / ntsd Debugging commands

.load sos.dll -> Loads sos.dll which can analyze managed code

!threads – shows the current threads running at the point when dump is taken

!threadpool – shows the thread pool threads, queued items and timers

~*e!clrstack -> Shows the stack trace of threads

!dumpheap –stat -> shows the heap memory contents

!gcroot
- shows all the references to managed memory in heap.

If the above command does not show try the below command it gives correctly:

For iterating thru gcroot

.foreach (obj {!dumpheap -short -mt 0x000123ab}) {!gcroot obj}

0x000123ab – Address of the object we need to look for any references

Comments

Popular posts from this blog

Network Security: LAN manager authentication level

Cisco AnyConnect Secure Mobility Client - VPN service not available. The VPN agent service is not responding