Groups | Blog | Home
all groups > visual studio .net debugging > january 2004 >

visual studio .net debugging : Debugger Automation?


Smith
1/23/2004 5:36:05 AM
Is it possible to access 'live' objects via debugging automation (i.e., through via a managed VS addin) ?

All I seem to be able to get is string representation of names and values.

thanks!

Habib Heydarian [MSFT]
1/23/2004 11:49:34 AM
You can evaluate the value of objects and call their members, etc. Does that
meet your requirements?

HabibH.

[quoted text, click to view]

Smith
1/25/2004 11:51:05 AM
Via the Debugger Object Model? How?

If my VS.NET plugin code is invoked when a breakpoint is hit (in another running VS instance), I can only get string references to values. I.e, I have a stack frame -- how do I get object references to the Locals

Habib Heydarian [MSFT]
1/25/2004 11:05:31 PM
You can use DTE.Debugger.GetExpression(). Here's a small code sample

Sub EvaluateExpression(ByVal str As String)

' Get the expression from the string
Dim e As Expression
e = DTE.Debugger.GetExpression(str, True)

' Iterate through the members for the expression
Dim i As Integer
For i = 1 To e.DataMembers.Count
Debug.Write(e.DataMembers.Item(i).Name & vbTab)
Debug.Write(e.DataMembers.Item(i).Value)
Next

End Sub

HabibH.

[quoted text, click to view]
running VS instance), I can only get string references to values. I.e, I
have a stack frame -- how do I get object references to the Locals?
[quoted text, click to view]

Smith
1/26/2004 12:51:06 AM
The problem remains however that all values from a run expression are strings.

I can see how I could manipulate the real object via only string expressions - however it seems like a massive workaround. There's no way to get at the *actual* object

Habib Heydarian [MSFT]
1/26/2004 1:17:22 AM
No. You can't get to the live objects in the debuggee from the debugger
automation model. The only way to do that is to use the same APIs that the
debugger does which are documented in the .NET Framework SDK. You can access
these APIs via native C++.

HabibH.

[quoted text, click to view]
expressions - however it seems like a massive workaround. There's no way to
get at the *actual* object?
[quoted text, click to view]

Smith
1/27/2004 7:46:16 AM
Thanks Habib for your help

Habib Heydarian [MSFT]
1/27/2004 6:49:39 PM
No problem. There are no plans to support this in the near future.

HabibH.

[quoted text, click to view]

apennell NO[at]SPAM online.microsoft.com
2/2/2004 10:42:46 PM
You can't, sorry.

--------------------
[quoted text, click to view]
through via a managed VS addin) ?

All I seem to be able to get is string representation of names and values.

thanks!


[quoted text, click to view]


--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
AddThis Social Bookmark Button