我DiagnosticEventSpecification
为 IntelliTrace 创建了几个自定义。这按预期工作。
<DiagnosticEventSpecification enabled="true">
<Bindings>
<Binding onReturn="false">
<ModuleSpecificationId>DiagnosticsTester</ModuleSpecificationId>
<TypeName>DiagnosticsTester.IntellitraceTest</TypeName>
<MethodName>TestTrace2</MethodName>
<MethodId>DiagnosticsTester.IntellitraceTest.TestTrace2(System.String):System.Void</MethodId>
<ShortDescription _locID="IntelliTraceEnterEvent_ShortDescription">The method TestTrace2.1 was called</ShortDescription>
<LongDescription _locID="IntelliTraceEvent_LongDescription">View the Locals window for details about the collected data</LongDescription>
<AutomaticDataQuery level="All" />
</Binding>
<Binding onReturn="true">
<ModuleSpecificationId>DiagnosticsTester</ModuleSpecificationId>
<TypeName>DiagnosticsTester.IntellitraceTest</TypeName>
<MethodName>TestTrace2</MethodName>
<MethodId>DiagnosticsTester.IntellitraceTest.TestTrace2(System.String):System.Void</MethodId>
<ShortDescription _locID="IntelliTraceExitEvent_ShortDescription">The method TestTrace2.1 returned</ShortDescription>
<LongDescription _locID="IntelliTraceEvent_LongDescription">View the Locals window for details about the collected data</LongDescription>
<AutomaticDataQuery level="All" />
</Binding>
</Bindings>
<CategoryId>IntelliTrace.generated.8889ce9d-2320-40c0-a6bf-dfac215354d2</CategoryId>
<SettingsName _locID="">DiagnosticsTester.IntellitraceTest.TestTrace2</SettingsName>
<SettingsDescription _locID=""></SettingsDescription>
</DiagnosticEventSpecification>
当我尝试使用它时,ProgrammableDataQuery
它无法捕获事件。根据 ProssesMon 和“Fusion log viewer”的说法,Intellitrace 从不尝试加载我的自定义 dll。定义如下所示:
<DiagnosticEventSpecification enabled="true">
<Bindings>
<Binding>
<ModuleSpecificationId>DiagnosticsTester</ModuleSpecificationId>
<TypeName>DiagnosticsTester.IntellitraceTest</TypeName>
<MethodName>TestTrace2</MethodName>
<MethodId>DiagnosticsTester.IntellitraceTest.TestTrace2(System.String):System.Void</MethodId>
<ProgrammableDataQuery>
<ModuleName>UnikDataQuery.dll</ModuleName>
<TypeName>UnikDataQuery.TestDataQuery</TypeName>
</ProgrammableDataQuery>
</Binding>
</Bindings>
<CategoryId>IntelliTrace.generated.8889ce9d-2320-40c0-a6bf-dfac215354d2</CategoryId>
<SettingsName _locID="">DiagnosticsTester.IntellitraceTest.TestTrace2</SettingsName>
<SettingsDescription _locID=""></SettingsDescription>
</DiagnosticEventSpecification>
我已将 dll 放置在 IntelliTrace 独立收集器之外以及 IntelliTrace 的 VS2015 文件夹中C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\14.0.0