2

I'm trying to write a Visual Studio package that shows a live object graph during debugging.

Is there any way to access the data of the managed debugger from within a VS 2010 package? I am aware of the EnvDTE.Debugger API, but this does not provide enough data for my use cases.

I do know it is possible using WinDbg/SOS, but this is not an option for me as I want to be able to use it nicely integrated.

I really appreciate any information!

Edit:

My requirements basically are those:

  1. Get all objects of the current stackframe when the debugger is in break mode.
  2. Get all objects referenced by a given object (i.e. its fields).
  3. Uniquely identify an object so that when several objects reference the same object there is a way to detect that its just one object that is referenced.
  4. Do all this while the VS debugger is attached, that effectively kills using another debugger...

What I found out so far:

  • EnvDTE.Debugger does not fulfill requirement 2 and 3
  • A debugger visualizer does not work because it does oly work on serializable objects
  • WinDbg does not work as it needs to be exclusively attached to the process.
4

2 回答 2

1

Not that I know of... If I understand your requirements correctly this is a tough call - you will have to somehow combine EnvDTE.Debugger with Debugger5 and CLR Profiler (which comes with source code!):

于 2011-09-19T06:47:54.367 回答
0

As suggested in Simon Mouriers comment, I will go for the manually serialized Debugger Visualizer approach.

This is the only reasonable way to do what I want to do, although I did not fully verify it yet.

于 2011-09-23T07:43:17.687 回答