我有一个.Net应用程序转储捕获异常,我正在使用windbg进行分析,并对其中一个方法的String参数值感兴趣.我已经隔离了String对象.我的windbg工作是:
0:000> .loadby sos mscorwks
0:000> !dso
OS Thread Id: 0x16f0 (0)
RSP/REG Object Name
00000000001fe908 000000000f011440 System.AppDomainSetup
00000000001fe918 000000000f0335f8 System.ArgumentException
00000000001fe920 000000000f011b60 System.String
0:000> !do 000000000f011b60
Name: System.String
MethodTable: 000007feef477a80
EEClass: 000007feef07e530
Size: 538(0x21a) bytes
(C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
String: C:\Windows\Installer\MSI2D87.tmp
Fields:
MT Field Offset Type VT Attr Value Name
000007feef47ecf0 4000096 8 System.Int32 1 instance 257 m_arrayLength
000007feef47ecf0 4000097 c System.Int32 1 instance 179 m_stringLength
000007feef4794c8 4000098 10 System.Char 1 instance 43 m_firstChar
000007feef477a80 4000099 20 System.String 0 shared static Empty …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一个Vistual Studio 2008宏来运行存储的TFS查询并显示结果.以前我创建了一个查询,并将其命名为"Assigned to Me",以显示当前分配给我的所有工作项.而不是View-> Team Explorer,单击,单击树到My Queries然后双击'Assigned to me'我想编写一个宏来自动执行这些步骤.
我提出的最好的是相当混乱:
Sub TemporaryMacro()
DTE.Windows.Item("{131369F2-062D-44A2-8671-91FF31EFB4F4}").Activate() 'Team Explorer
DTE.ActiveWindow.Object.GetItem("tfsserver\MyProject\Work Items\My Queries\Assigned to Me").Select(vsUISelectionType.vsUISelectionTypeSelect)
DTE.ActiveWindow.Object.DoDefaultAction()
DTE.Windows.Item("{131369F2-062D-44A2-8671-91FF31EFB4F4}").Close()
DTE.Windows.Item("Assigned to Me [Results]").Activate()
End Sub
Run Code Online (Sandbox Code Playgroud)
有没有更好的办法?