{"id":183,"date":"2014-12-16T17:40:00","date_gmt":"2014-12-16T17:40:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2014\/12\/16\/custom-tracesource-and-debugging-using-intellitrace\/"},"modified":"2022-05-26T01:25:19","modified_gmt":"2022-05-26T09:25:19","slug":"custom-tracesource-and-debugging-using-intellitrace","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/custom-tracesource-and-debugging-using-intellitrace\/","title":{"rendered":"Custom TraceSource and debugging using IntelliTrace"},"content":{"rendered":"<p><a href=\"https:\/\/aka.ms\/itrace\">IntelliTrace<\/a> in Visual Studio Enterprise comes with support for tracing out of the box. All you have to do is make sure the appropriate IntelliTrace events are enabled in VS settings and IntelliTrace will capture trace statements as events.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/12\/3835.1.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>When you are not using the default Debug.Trace methods and are instead using a custom <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/dd632733.aspx\">TraceSource<\/a>, you don\u2019t want to rewrite your tracing code just to get the trace data captured by IntelliTrace. This blog post will explain how to add support for events from a custom <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/dd632733.aspx\">TraceSource<\/a> in addition to the events listed in VS settings (see screenshot above).<\/p>\n<p>If you&#8217;d like, you can <a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/02\/CustomTracing%20(source%20code).zip\">download the source code and follow along as well as the .itrace file<\/a> that was generated.<\/p>\n<h2>Overview<\/h2>\n<ol>\n<li>Create a custom TraceListener specifically for IntelliTrace<\/li>\n<li>Enable the custom TraceListener for your application<\/li>\n<li>Update the collection plan XML file to tell IntelliTrace about the custom TraceListener<\/li>\n<li>IntelliTrace will now pick up all messages that are sent to the custom TraceListener<\/li>\n<\/ol>\n<h2>Step 1 \u2013 Create a custom trace listener specifically for IntelliTrace<\/h2>\n<p>Create a class that extends TraceListener (you will need a reference to System.Diagnostics). In this example we are using the namepace \u201cCustomTracing\u201d, we will need to know this later on. You can use a difference namespace for your TraceListener, but make sure you use that same namespace whenever we are using \u201cCustomTracing\u201d throughout this example.<\/p>\n<div class=\"csharpcode\">\n  Code: <\/p>\n<pre style=\"border: 1px dashed #CCCCCC;background: #f0f0f0;padding: 0px;color: #000000;text-align: left;line-height20px;color: #000000\"><span class=\"keyword\">using<\/span> System;\n<span class=\"keyword\">using<\/span> System.Diagnostics;\n\n<span class=\"keyword\">namespace<\/span> CustomTracing\n{\n    <span class=\"keyword\">class<\/span> <span class=\"type\">TraceListenerForIntelliTrace<\/span> : <span class=\"type\">TraceListener<\/span>\n    {\n        <span class=\"comment2\">\/\/\/<\/span><span class=\"comment2\">&lt;summary&gt;<\/span>\n        <span class=\"comment2\">\/\/\/<\/span><span class=\"comment\"> A class scope variable that holds the contents of the current<\/span>\n        <span class=\"comment2\">\/\/\/<\/span><span class=\"comment\"> trace message being sent to this custom TraceListener.<\/span>\n        <span class=\"comment2\">\/\/\/<\/span><span class=\"comment\"> We can expect multiple .Write(string) calls and one final<\/span>\n        <span class=\"comment2\">\/\/\/<\/span><span class=\"comment\"> .WriteLine(string) call that will signify the end of the message.<\/span>\n        <span class=\"comment2\">\/\/\/<\/span><span class=\"comment2\">&lt;\/summary&gt;<\/span>\n        <span class=\"keyword\">private<\/span> <span class=\"keyword\">string<\/span> message = <span class=\"type\">String<\/span>.<span class=\"type\">Empty<\/span>;\n\n        <span class=\"keyword\">public<\/span> <span class=\"keyword\">override<\/span> <span class=\"keyword\">void<\/span> WriteLine(<span class=\"keyword\">string<\/span> message)\n        {\n            <span class=\"comment\">\/\/ Since we are told to WriteLine now, it means<\/span>\n            <span class=\"comment\">\/\/ this is the last part of the message<\/span>\n            <span class=\"keyword\">this<\/span>.message += message;\n            <span class=\"keyword\">this<\/span>.WriteMessage(<span class=\"keyword\">this<\/span>.message);\n\n            <span class=\"comment\">\/\/ Since we just wrote the last part of the messsage<\/span>\n            <span class=\"comment\">\/\/ reset the class scope variable to an empty string<\/span>\n            <span class=\"comment\">\/\/ to prepare for the next message<\/span>\n            <span class=\"keyword\">this<\/span>.message = <span class=\"type\">String<\/span>.<span class=\"type\">Empty<\/span>;\n        }\n\n        <span class=\"keyword\">public<\/span> <span class=\"keyword\">override<\/span> <span class=\"keyword\">void<\/span> Write(<span class=\"keyword\">string<\/span> message)\n        {\n            <span class=\"comment\">\/\/ Since we are told to just Write and not WriteLine<\/span>\n            <span class=\"comment\">\/\/ it means there is more to come for this message, so<\/span>\n            <span class=\"comment\">\/\/ use a class scope variable to build up the message<\/span>\n            <span class=\"keyword\">this<\/span>.message += message;\n        }\n\n        <span class=\"keyword\">public<\/span> <span class=\"keyword\">void<\/span> WriteMessage(<span class=\"keyword\">string<\/span> message)\n        {\n            <span class=\"comment\">\/\/ Do nothing here, we just need the method to exist<\/span>\n            <span class=\"comment\">\/\/ so that IntelliTrace can hook into it and extract<\/span>\n            <span class=\"comment\">\/\/ the parameter \"message\"<\/span>\n        }\n    }\n}\n\n\n<\/pre>\n<\/div>\n<h2>Step 2 &#8211; Enable the custom TraceListener for your application<\/h2>\n<p>Make the following changes to app\u2019s config. The <span style=\"background-color: #ffff00\">highlighted<\/span> parts will need to be updated with the appropriate namespace and class name that you choose for your custom TraceListener.<\/p>\n<p><!-- code formatted by http:\/\/manoli.net\/csharpformat\/ --><\/p>\n<pre class=\"csharpcode\"><span class=\"kwrd\">&lt;<\/span><span class=\"html\">system.diagnostics<\/span><span class=\"kwrd\">&gt;<\/span>\n    <span class=\"kwrd\">&lt;<\/span><span class=\"html\">sources<\/span><span class=\"kwrd\">&gt;<\/span>\n      <span class=\"kwrd\">&lt;<\/span><span class=\"html\">source<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=\"TraceTest\"<\/span> <span class=\"attr\">switchName<\/span><span class=\"kwrd\">=\"SourceSwitch\"<\/span>\n        <span class=\"attr\">switchType<\/span><span class=\"kwrd\">=\"System.Diagnostics.SourceSwitch\"<\/span> <span class=\"kwrd\">&gt;<\/span>\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">listeners<\/span><span class=\"kwrd\">&gt;<\/span>\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">add<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=\"<span style=\"background-color: #ffff00\">TraceListenerForIntelliTrace<\/span>\"<\/span> <span class=\"attr\">type<\/span><span class=\"kwrd\">=\"<span style=\"background-color: #ffff00\">CustomTracing.TraceListenerForIntelliTrace, CustomTracing<\/span>\"<\/span><span class=\"kwrd\">\/&gt;<\/span>\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">remove<\/span> <span class=\"attr\">name<\/span> <span class=\"kwrd\">=\"Default\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\n        <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">listeners<\/span><span class=\"kwrd\">&gt;<\/span>\n      <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">source<\/span><span class=\"kwrd\">&gt;<\/span>\n    <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">sources<\/span><span class=\"kwrd\">&gt;<\/span>\n    <span class=\"kwrd\">&lt;<\/span><span class=\"html\">switches<\/span><span class=\"kwrd\">&gt;<\/span>\n      <span class=\"rem\">&lt;!-- You can set the level at which tracing is to occur --&gt;<\/span>\n      <span class=\"kwrd\">&lt;<\/span><span class=\"html\">add<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=\"SourceSwitch\"<\/span> <span class=\"attr\">value<\/span><span class=\"kwrd\">=\"Information\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\n      <span class=\"rem\">&lt;!-- You can turn tracing off --&gt;<\/span>\n      <span class=\"rem\">&lt;!--add name=\"SourceSwitch\" value=\"Off\" --&gt;<\/span>\n    <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">switches<\/span><span class=\"kwrd\">&gt;<\/span>\n<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">system.diagnostics<\/span><span class=\"kwrd\">&gt;<\/span>\n<\/pre>\n<h2>Step 3 &#8211; Update the collection plan XML file to tell IntelliTrace about the custom TraceListener<\/h2>\n<p>Add the following XML fragment just before the <\/ModuleSpecifications>\u00a0closing tag. The <span style=\"background-color: #ffff00\">highlighted part<\/span> will need to be updated with the name of the assembly that contains your custom TraceListener.<\/p>\n<p><!-- code formatted by http:\/\/manoli.net\/csharpformat\/ --><\/p>\n<pre class=\"csharpcode\"><span class=\"kwrd\">&lt;<\/span><span class=\"html\">ModuleSpecification<\/span> <span class=\"attr\">Id<\/span><span class=\"kwrd\">=\"custom\"<\/span><span class=\"kwrd\">&gt;<\/span><span style=\"background-color: #ffff00\">CustomTracing.exe<\/span><span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">ModuleSpecification<\/span><span class=\"kwrd\">&gt;<\/span><\/pre>\n<p>Add the following XML fragment just before the <\/DiagnosticEventSpecifications> closing tag. The <span style=\"background-color: #ffff00\">highlighted parts<\/span> will need to be updated with the appropriate namespace and class name that you choose for your custom TraceListener.<\/p>\n<p><!-- code formatted by http:\/\/manoli.net\/csharpformat\/ --><\/p>\n<pre class=\"csharpcode\"><span class=\"kwrd\">&lt;<\/span><span class=\"html\">DiagnosticEventSpecification<\/span> <span class=\"attr\">enabled<\/span><span class=\"kwrd\">=\"true\"<\/span><span class=\"kwrd\">&gt;<\/span>\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">CategoryId<\/span><span class=\"kwrd\">&gt;<\/span>tracing<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">CategoryId<\/span><span class=\"kwrd\">&gt;<\/span>\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">SettingsName<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"settingsName.Custom\"<\/span><span class=\"kwrd\">&gt;<\/span>Custom TraceSource<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">SettingsName<\/span><span class=\"kwrd\">&gt;<\/span>\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">SettingsDescription<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"settingsDescription.Custom\"<\/span><span class=\"kwrd\">&gt;<\/span>Custom TraceSource<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">SettingsDescription<\/span><span class=\"kwrd\">&gt;<\/span>\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">Bindings<\/span><span class=\"kwrd\">&gt;<\/span>\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">Binding<\/span><span class=\"kwrd\">&gt;<\/span>\n            <span class=\"kwrd\">&lt;<\/span><span class=\"html\">ModuleSpecificationId<\/span><span class=\"kwrd\">&gt;<\/span>custom<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">ModuleSpecificationId<\/span><span class=\"kwrd\">&gt;<\/span>\n            <span class=\"kwrd\">&lt;<\/span><span class=\"html\">TypeName<\/span><span class=\"kwrd\">&gt;<\/span><span style=\"background-color: #ffff00\">CustomTracing.TraceListenerForIntelliTrace<\/span><span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">TypeName<\/span><span class=\"kwrd\">&gt;<\/span>\n            <span class=\"kwrd\">&lt;<\/span><span class=\"html\">MethodName<\/span><span class=\"kwrd\">&gt;<\/span>WriteMessage<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">MethodName<\/span><span class=\"kwrd\">&gt;<\/span>\n            <span class=\"kwrd\">&lt;<\/span><span class=\"html\">MethodId<\/span><span class=\"kwrd\">&gt;<\/span><span style=\"background-color: #ffff00\">CustomTracing.TraceListenerForIntelliTrace.WriteMessage(System.String):System.Void<\/span><span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">MethodId<\/span><span class=\"kwrd\">&gt;<\/span>\n            <span class=\"kwrd\">&lt;<\/span><span class=\"html\">ShortDescription<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"shortDescription.Custom\"<\/span><span class=\"kwrd\">&gt;<\/span>\"{0}\"<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">ShortDescription<\/span><span class=\"kwrd\">&gt;<\/span>\n            <span class=\"kwrd\">&lt;<\/span><span class=\"html\">LongDescription<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"longDescription.Custom\"<\/span><span class=\"kwrd\">&gt;<\/span>\"{0}\"<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">LongDescription<\/span><span class=\"kwrd\">&gt;<\/span>\n            <span class=\"kwrd\">&lt;<\/span><span class=\"html\">DataQueries<\/span><span class=\"kwrd\">&gt;<\/span>\n              <span class=\"kwrd\">&lt;<\/span><span class=\"html\">DataQuery<\/span> <span class=\"attr\">index<\/span><span class=\"kwrd\">=\"1\"<\/span> <span class=\"attr\">maxSize<\/span><span class=\"kwrd\">=\"4096\"<\/span> <span class=\"attr\">type<\/span><span class=\"kwrd\">=\"String\"<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=\"message\"<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"dataquery.Custom.text\"<\/span> <span class=\"attr\">_locAttrData<\/span><span class=\"kwrd\">=\"name\"<\/span> <span class=\"attr\">query<\/span><span class=\"kwrd\">=\"\"<\/span><span class=\"kwrd\">&gt;&lt;\/<\/span><span class=\"html\">DataQuery<\/span><span class=\"kwrd\">&gt;<\/span>\n            <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">DataQueries<\/span><span class=\"kwrd\">&gt;<\/span>\n         <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">Binding<\/span><span class=\"kwrd\">&gt;<\/span>\n        <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">Bindings<\/span><span class=\"kwrd\">&gt;<\/span>\n      <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">DiagnosticEventSpecification<\/span><span class=\"kwrd\">&gt;<\/span>\n<\/pre>\n<p><strong>Where to make this change when using F5\/Attach<\/strong><\/p>\n<p>If you are using F5\/Attach to debug the application, then you need to change the \u201ccollectionplan.xml\u201d file found here:<br \/>\nC:Program Files (x86)Microsoft Visual Studio [Version of your VS]Common7IDECommonExtensionsMicrosoftIntelliTrace[Version of your VS]en<\/p>\n<p>For example, for VS 2013:<br \/>\nC:Program Files (x86)Microsoft Visual Studio 12.0Common7IDECommonExtensionsMicrosoftIntelliTrace12.0.0en<\/p>\n<p><strong>Where to make this change when using the IntelliTraceStandalone Collector<\/strong><\/p>\n<p>If you are using the <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2014\/08\/07\/intellitrace-standalone-collector-is-back.aspx\">IntelliTrace Standalone Collector<\/a> then you need to change the collection plan .xml file that you pass in as an argument using PowerShell. <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/vstudio\/hh398365(v=vs.110).aspx\">More information on how to use the standalone collector<\/a>.<\/p>\n<p><strong>Where to make this change when using Microsoft Monitoring Agent (MMA)<\/strong><\/p>\n<p>If you are <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2013\/09\/20\/introducing-microsoft-monitoring-agent.aspx\">using MMA<\/a> then you need to change the collection plan .xml file that you pass in as an argument using PowerShell and the Start-WebApplicationMonitoring command. If you are not used to providing a custom collection plan, you can find the default collection plans here:<br \/>\nC:Program FilesMicrosoft Monitoring AgentAgentIntelliTraceCollector<\/p>\n<p><strong>Where to make this change when using Azure<\/strong><\/p>\n<p>When you publish your project to Azure, you get the choice to enable IntelliTrace and change its settings<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/12\/4263.1.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>Clicking \u201cSettings\u2026\u201d shows this dialog which looks just like the Visual Studio settings for IntelliTrace, but it\u2019s not quite the same:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/12\/8585.3.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>As a result of enabling IntelliTrace and changing the settings a new collectionplan.xml file will appear here:<br \/>\n%appdata%MicrosoftVisualStudio12.0Cloud Tools<\/p>\n<p>This is the actual XML file that gets uploaded to Azure. So it\u2019s this XML file that you need to add the XML fragment to for the custom TraceListener.<\/p>\n<h2>Step 4 &#8211; IntelliTrace will now pick up all messages that are sent to the custom TraceListener<\/h2>\n<p>My demo console app below is trying to write 3 different trace messages<\/p>\n<div class=\"csharpcode\">\n  Code: <\/p>\n<pre style=\"border: 1px dashed #CCCCCC;background: #f0f0f0;padding: 0px;color: #000000;text-align: left;line-height20px;color: #000000\"><span class=\"keyword\">using<\/span> System;\n<span class=\"keyword\">using<\/span> System.Diagnostics;\n\n<span class=\"keyword\">namespace<\/span> CustomTracing\n{\n    <span class=\"keyword\">class<\/span> <span class=\"type\">Program<\/span>\n    {\n        <span class=\"keyword\">static<\/span> <span class=\"type\">TraceSource<\/span> ts = <span class=\"keyword\">new<\/span> <span class=\"type\">TraceSource<\/span>(<span class=\"string\">\"TraceTest\"<\/span>);\n\n        <span class=\"keyword\">static<\/span> <span class=\"keyword\">void<\/span> Main(<span class=\"keyword\">string<\/span>[] args)\n        {\n            ts.TraceInformation(<span class=\"string\">\"Trace using TraceSource.TraceInformation\"<\/span>);\n            ts.TraceEvent(<span class=\"type\">TraceEventType<\/span>.Information, 1, <span class=\"string\">\"Trace using TraceSource.TraceEvent\"<\/span>);\n            ts.TraceEvent(<span class=\"type\">TraceEventType<\/span>.<span class=\"type\">Error<\/span>, 2, <span class=\"string\">\"Trace using TraceSource.TraceEvent\"<\/span>);\n\n            <span class=\"type\">Console<\/span>.WriteLine(<span class=\"string\">\"Hit enter to exit...\"<\/span>);\n            <span class=\"type\">Console<\/span>.ReadLine();\n        }\n    }\n}\n\n\n<\/pre>\n<\/div>\n<p>so I expect IntellITrace to pick up 3 separate trace events<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/12\/7450.4.png\" alt=\"\" border=\"0\" \/><\/p>\n<h2>Bonus Step 5 \u2013 Customizing your trace messages<\/h2>\n<p>You have two ways to customize the way your trace messages are captured by IntelliTrace:<\/p>\n<ol>\n<li>Manipulate the string within your custom TraceListener class before calling method WriteMessage(string message) is called.<\/li>\n<li>Change the .xml collection plan file, and more specifically the elements ShortDescription (what IntelliTrace shows in VS while the event is collapsed) and LongDescription (what IntelliTrace shows in VS while the event is selected and expanded<\/li>\n<\/ol>\n<div>\n  This just prints out the trace message as a whole:\n<\/div>\n<p><!-- code formatted by http:\/\/manoli.net\/csharpformat\/ --><\/p>\n<pre class=\"csharpcode\"><span class=\"kwrd\">&lt;<\/span><span class=\"html\">ShortDescription<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"shortDescription.Custom\"<\/span><span class=\"kwrd\">&gt;<\/span>\"{0}\"<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">ShortDescription<\/span><span class=\"kwrd\">&gt;<\/span>\n<span class=\"kwrd\">&lt;<\/span><span class=\"html\">LongDescription<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"longDescription.Custom\"<\/span><span class=\"kwrd\">&gt;<\/span>\"{0}\"<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">LongDescription<\/span><span class=\"kwrd\">&gt;<\/span><\/pre>\n<div>\n  This changes the long version of the trace message:\n<\/div>\n<p><!-- code formatted by http:\/\/manoli.net\/csharpformat\/ --><\/p>\n<pre class=\"csharpcode\"><span class=\"kwrd\">&lt;<\/span><span class=\"html\">ShortDescription<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"shortDescription.Custom\"<\/span><span class=\"kwrd\">&gt;<\/span>\"{0}\"<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">ShortDescription<\/span><span class=\"kwrd\">&gt;<\/span>\n<span class=\"kwrd\">&lt;<\/span><span class=\"html\">LongDescription<\/span> <span class=\"attr\">_locID<\/span><span class=\"kwrd\">=\"longDescription.Custom\"<\/span><span class=\"kwrd\">&gt;<\/span>Trace captured by custom TraceListener: \"{0}\"<span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">LongDescription<\/span><span class=\"kwrd\">&gt;<\/span><\/pre>\n<div>\n  We are always looking for feedback and comments for our features. Please <a href=\"https:\/\/twitter.com\/IntelliTrace\">send us a tweet<\/a> or <a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/vstudio\/en-US\/home?forum=vsdebug\">visit the MSDN Diagnostics forums<\/a>.\n<\/div>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/02\/CustomTracing%20(source%20code).zip\">CustomTracing (source code).zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>IntelliTrace in Visual Studio Enterprise comes with support for tracing out of the box. All you have to do is make sure the appropriate IntelliTrace events are enabled in VS settings and IntelliTrace will capture trace statements as events. When you are not using the default Debug.Trace methods and are instead using a custom TraceSource, [&hellip;]<\/p>\n","protected":false},"author":127,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[226,1,225],"tags":[],"class_list":["post-183","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ci","category-devops","category-git"],"acf":[],"blog_post_summary":"<p>IntelliTrace in Visual Studio Enterprise comes with support for tracing out of the box. All you have to do is make sure the appropriate IntelliTrace events are enabled in VS settings and IntelliTrace will capture trace statements as events. When you are not using the default Debug.Trace methods and are instead using a custom TraceSource, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/127"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=183"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/183\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}