I'd like to know if and how I might be able to use the Mono compiler as a service (see here and here ) within a debugging context to query/modify/visualize/etc objects at runtime within the debugger. At the moment, per this SO post the Roslyn CTP does not support this feature.
Yes, thats perfectly possible. I cannot tell you the exact details on how to implement this, but take a look at MonoDevelop which actually implements your idea since v2.8 (or maybe earlier). In MonoDevelop, you have a REPL Pad available, which allows you to enter C# code in the very same context your application stopped because of a breakpoint. I've attached a simple Screenshot of MD in the debugging view and the REPL pad open. Since MD is opensource, you could check out the sources how it was implemented and strip the parts that you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With