Reputation: 4777
I wish to build a small debugger in C# that allows me to attach to another c# project and debug it.
I believe Microsoft has a dll that allows me to do this.
For example if I know the code in the target process then I can look for certain Classes and interrogate them etc and look at their member variables etc.
What is this Microsoft dll called??
Upvotes: 1
Views: 143
Reputation: 59633
It is called the debugger engine and resides in dbgeng.dll
. However, this is not a managed DLL.
For .NET, there is also MDbg, but it doesn't have as many features.
Also note: you can get information about objects and member variables, but it may fail to get local variables on the stack in Release mode if the code was optimized.
If you want to do similar things, e.g. to get familiar with the possibilities, you can try Microsoft's Debugger windbg and the .NET extension sos.
First commands to get started with WinDbg and SOS:
.loadby sos clr
!dumpheap -stat
Upvotes: 1