{"id":36026,"date":"2012-06-07T14:10:00","date_gmt":"2012-06-07T14:10:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/andrewarnottms\/2012\/06\/07\/enable-c-and-javascript-project-system-tracing\/"},"modified":"2019-04-12T09:18:31","modified_gmt":"2019-04-12T16:18:31","slug":"enable-c-and-javascript-project-system-tracing","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/enable-c-and-javascript-project-system-tracing\/","title":{"rendered":"Enable C++ and Javascript project system tracing"},"content":{"rendered":"<p>I\u2019ve previously posted on <a href=\"http:\/\/blogs.msdn.com\/b\/vsproject\/archive\/2009\/07\/21\/enable-c-project-system-logging.aspx\">how to enable logging in the C++ project system in Visual Studio 2010<\/a>.\u00a0 In Visual Studio 2012 we\u2019ve changed the way the Common Project System (aka \u201cCPS\u201d) emits trace messages so below I introduce an updated xml snippet that works in Visual Studio 2012.\u00a0 Since CPS is now the project system driving JavaScript as well, the below xml snippet impacts that as well.<\/p>\n<p>To enable tracing, add the following xml block to devenv.exe.config file directly under the &lt;configuration&gt; root node, <strong>after the &lt;\/configSections&gt; end tag.<\/strong> Make sure to make a backup first so that you can revert back in case something goes wrong.\u00a0 You may need to change &#8220;Warning&#8221; below with &#8220;Verbose&#8221; if you want verbose logging.<\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;system.diagnostics&gt;\r\n    &lt;sources&gt;\r\n        &lt;source name=\"CPS\" switchName=\"CPS\" switchType=\"System.Diagnostics.SourceSwitch\"&gt;\r\n            &lt;listeners&gt;\r\n                &lt;add name=\"cpsFileLogger\"\/&gt;\r\n            &lt;\/listeners&gt;\r\n        &lt;\/source&gt;\r\n    &lt;\/sources&gt;\r\n    &lt;switches&gt;\r\n        &lt;add name=\"CPS\" value=\"Warning\"\/&gt;\r\n    &lt;\/switches&gt;\r\n    &lt;sharedListeners&gt;\r\n        &lt;add name=\"cpsFileLogger\" type=\"System.Diagnostics.TextWriterTraceListener\" initializeData=\"C:\\Temp\\devenv-cps.log\"&gt;\r\n            &lt;filter type=\"System.Diagnostics.EventTypeFilter\" initializeData=\"Warning\"\/&gt;\r\n        &lt;\/add&gt;\r\n    &lt;\/sharedListeners&gt;\r\n    &lt;trace autoflush=\"true\" indentsize=\"4\" \/&gt;\r\n&lt;\/system.diagnostics&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve previously posted on how to enable logging in the C++ project system in Visual Studio 2010.\u00a0 In Visual Studio 2012 we\u2019ve changed the way the Common Project System (aka \u201cCPS\u201d) emits trace messages so below I introduce an updated xml snippet that works in Visual Studio 2012.\u00a0 Since CPS is now the project system [&hellip;]<\/p>\n","protected":false},"author":2685,"featured_media":37840,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[4617,116,3915,46],"class_list":["post-36026","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-permierdev","tag-andarno","tag-c","tag-cps","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>I\u2019ve previously posted on how to enable logging in the C++ project system in Visual Studio 2010.\u00a0 In Visual Studio 2012 we\u2019ve changed the way the Common Project System (aka \u201cCPS\u201d) emits trace messages so below I introduce an updated xml snippet that works in Visual Studio 2012.\u00a0 Since CPS is now the project system [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/36026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/2685"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=36026"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/36026\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37840"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=36026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=36026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=36026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}