views:

157

answers:

3

Is there a framework which can be used in your application, to make it expose internal objects on some port for inspection.

for.e.g. after i start my application in this case a GUI Application, and then say launch http://localhost:9100 then it should show me the statistics of the app.

I played a bit with HttpListener accepting connections and then outputting raw HTML, it works fine for simple tasks, but there is too much worked involved if i have make a proper object browser.

Thanks in Advance.

A: 

No, there aren't really any libraries that I'm familiar with. You would want something like visual studio implemented with it's runtime debug objet browser. That however is not an exposed API so you'd have to make your own.

As far as exposing the endpoint, you can use WCF to easily expose a TCP service (or whatever else, but NetTcp is just so easy) as an entrypoint into the functionality you are describing.

Joel Martinez
A: 

You can use Fiddler as a framework and write your own plugins in .net! Check it out http://www.fiddler2.com/Fiddler2/extensions.asp

Jernej Gorički
A: 

Not sure if this is what you want, its not a framework, but a tool, but you can use .Net Memory Validator to see which objects (and how many of them) are allocated in your application. You need to look at the Objects tab.

You need to launch your app with DNMV - you can't view an already running process.

Stephen Kellett