
Tools for Exploring .NET Internals - matthewwarren
http://mattwarren.org/2018/06/15/Tools-for-Exploring-.NET-Internals/
======
ubercow
It's very frustrating having all of these tools only support Windows.

Despite all the wonderful work Microsoft has done with CoreCLR, the "IDE"
debugger is still only available under a license that only permits use with
Visual Studio and VSCode [1] and mdbg is still nowhere to be found for CoreCLR
[2].

1:
[https://github.com/dotnet/core/issues/505](https://github.com/dotnet/core/issues/505)
2:
[https://github.com/dotnet/coreclr/issues/1145](https://github.com/dotnet/coreclr/issues/1145)

From what I've gathered, the best you have right now for doing command line
debugging is the "SOS" plugin for lldb, which seems to require building the
lldb plugin and sometimes even lldb (!!) yourself [3][4].

3:
[https://github.com/dotnet/coreclr/blob/master/Documentation/...](https://github.com/dotnet/coreclr/blob/master/Documentation/building/debugging-
instructions.md)

4: [http://blogs.microsoft.co.il/sasha/2017/02/26/analyzing-a-
ne...](http://blogs.microsoft.co.il/sasha/2017/02/26/analyzing-a-net-core-
core-dump-on-linux/)

Not very fun if you're not using Windows.

~~~
systems
how does jetbrains rider ide provide debugging then

~~~
xadoc
Jetbrains was using a package provided by Microsoft and blogged that they
would soon have to disable debugging of CoreCLR

Read “The Bad News” [https://blog.jetbrains.com/dotnet/2017/02/15/rider-
eap-17-nu...](https://blog.jetbrains.com/dotnet/2017/02/15/rider-eap-17-nuget-
unit-testing-build-debugging/)

Also the licensing issue
[https://github.com/dotnet/core/issues/505](https://github.com/dotnet/core/issues/505)

Then a week later with the licensing issue still in place Jetbrains
implemented their own debugger, on the comments it reads "This is our own
debugger implementation." [https://blog.jetbrains.com/dotnet/2017/02/23/rider-
eap-18-co...](https://blog.jetbrains.com/dotnet/2017/02/23/rider-
eap-18-coreclr-debugging-back-windows/)

------
Akaahn
Not as all-encompassing as all those tools, but all I've ever needed is,
dotPeek + de4dot.

~~~
SeriousM
dw4dot on combination with dnSpy is unbeatable to "understand" licensed
software :)

------
theclaw
No mention of the excellent LINQPad[1] or ilspy[2]? Both do decompilation, I
use LINQPad a lot for quick sanity checks, although it's intended for database
work I rarely actually use it for that. It'll also spit out IL code and
expression trees.

ILSpy is a lightweight decompiler that you can just drop DLL files into to see
their code. It has some nice analysis tools that allow you to find references
and implementations. I associated .dll files with it so they open in ILSpy by
default.

[1] [https://www.linqpad.net/](https://www.linqpad.net/) [2]
[https://github.com/icsharpcode/ILSpy](https://github.com/icsharpcode/ILSpy)

~~~
mintplant
You can plug Reflexil [0] into ILSpy for on-the-fly code patching. Then once
you've got something going, you can (manually) port your changes over to a
Mono.Cecil-based [1] patching program. This is how I hack up Unity games
written with C#.

[0] [http://reflexil.net/](http://reflexil.net/)

[1] [https://github.com/jbevain/cecil](https://github.com/jbevain/cecil)

------
ColinWielga
Wow, these are awesome!

