{"id":2113,"date":"2013-12-12T13:28:22","date_gmt":"2013-12-12T13:28:22","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2013\/12\/12\/how-to-debug-release-management-components\/"},"modified":"2019-02-14T17:54:05","modified_gmt":"2019-02-15T01:54:05","slug":"how-to-debug-release-management-components","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/how-to-debug-release-management-components\/","title":{"rendered":"How to debug Release Management components"},"content":{"rendered":"<p class=\"MsoNormal\" style=\"margin: 0in 0in 0pt\"><b><span style=\"color:\"><font color=\"#000000\">&#160;<\/font><\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 0pt\"><b><font color=\"#000000\"><font size=\"4\">Enable logs on Microsoft Deployment Agent:<\/font> <\/font><\/b><\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 0pt\"><strong><\/strong><\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 0pt\"><strong><\/strong><\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">The first and most easy way to debug why an action\/component is failing is to open the logs available through the deployment step of your release within Release Management (RM) client. To do this, open your release, access the <b>View Log<\/b> section, click on the <b>Details<\/b> button of the deployment step that failed and requires debugging. <\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">If that step does not provide enough information about the error follow these steps: <\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\"><strong>     <br \/>Option A:<\/strong><\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">If identity running the Deployment Agent service is a \u201cService User\u201d in RM: <\/p>\n<blockquote>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">1.&#160;&#160; In Windows Services, stop the Microsoft Deployment Agent Service<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">2.&#160;&#160; Run the DeploymentAgent.exe located in %Program Files(x86)%\\ Microsoft Visual studio 12.0\\Release Management\\bin with \u201cdebug\u201d option from command line. (DeploymentAgent.exe debug start)<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\"><strong>Or<\/strong><\/p>\n<\/blockquote>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\"><strong>Option B:<\/strong><\/p>\n<blockquote>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">1.&#160;&#160;&#160;&#160;&#160; Access the deployer machine. We first need to edit the configuration file in order to output more deployment information to log file. Find the configuration file under %Program Files(x86)%\\ Microsoft Visual studio 12.0\\Release Management\\bin. Backup the Deploymentagent.exe.config file.<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">2.&#160;&#160;&#160;&#160;&#160; Edit the following section of Deploymentagent.exe.config file. By default the tracing is enabled and logging is set to error. Change logging to filter=\u201dVerbose\u201d to get more detailed level logging.<\/p>\n<\/blockquote>\n<blockquote>\n<div>\n<pre class=\"csharpcode\"><span class=\"kwrd\">&lt;<\/span><span class=\"html\">loggingConfiguration<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=&quot;Logging Application Block&quot;<\/span> <font style=\"background-color: #ffff00\"><span class=\"attr\">tracingEnabled<\/span><span class=\"kwrd\">=&quot;true&quot;<\/span><\/font> <span class=\"attr\">defaultCategory<\/span><span class=\"kwrd\">=&quot;General&quot;<\/span> <span class=\"attr\">logWarningsWhenNoCategoriesMatch<\/span><span class=\"kwrd\">=&quot;true&quot;<\/span><span class=\"kwrd\">&gt;<\/span><br \/>...<br \/>    <span class=\"kwrd\">&lt;<\/span><span class=\"html\">listeners<\/span><span class=\"kwrd\">&gt;<\/span><br \/>        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">add<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=&quot;Rolling Flat File Trace Listener&quot;<\/span>        <br \/>                   <span class=\"attr\">formatter<\/span><span class=\"kwrd\">=&quot;Single Line Text Formatter&quot;<\/span>        <br \/>                   <span class=\"attr\">traceOutputOptions<\/span><span class=\"kwrd\">=&quot;None&quot;<\/span>        <br \/>                   <font style=\"background-color: #ffff00\"><span class=\"attr\">filter<\/span><span class=\"kwrd\">=&quot;Error&quot;<\/span><\/font>        <br \/>                   <font style=\"background-color: #ffff00\"><span class=\"attr\">fileName<\/span><span class=\"kwrd\">=&quot;%TEMP%\\Microsoft\\ReleaseManagement\\12.0\\Logs\\DeploymentAgent.log&quot;<\/span><\/font>        <br \/>                   <span class=\"attr\">rollSizeKB<\/span><span class=\"kwrd\">=&quot;5000&quot;<\/span>        <br \/>                   <span class=\"attr\">rollFileExistsBehavior<\/span><span class=\"kwrd\">=&quot;Increment&quot;<\/span>        <br \/>                   <span class=\"attr\">timeStampPattern<\/span><span class=\"kwrd\">=&quot;yyyy-MM-dd&quot;<\/span>        <br \/>                   <span class=\"attr\">type<\/span><span class=\"kwrd\">=&quot;Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;<\/span><br \/>                   <span class=\"attr\">listenerDataType<\/span><span class=\"kwrd\">=&quot;Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;<\/span> <span class=\"kwrd\">\/&gt;<\/span><br \/>    <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">listeners<\/span><span class=\"kwrd\">&gt;<\/span><br \/>...<br \/><span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">loggingConfiguration<\/span><span class=\"kwrd\">&gt;<\/span><\/pre>\n<\/p><\/div>\n<\/blockquote>\n<blockquote>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">3.&#160;&#160;&#160;&#160;&#160; Save the Deploymentagent.exe.config file.<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">5.&#160;&#160;&#160;&#160;&#160; In Windows services. Restart the windows service \u201cMicrosoft Deployment Agent\u201d.<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">6.&#160;&#160;&#160;&#160;&#160; Reproduce the failing deployment, detailed logs will get generated under the TEMP directory of the user the \u201cDeployment Agent\u201d running as. For e.g.<\/p>\n<ul style=\"margin-bottom: 0in;margin-top: 0in\" type=\"disc\">\n<ul style=\"margin-bottom: 0in;margin-top: 0in\" type=\"circle\">\n<li class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">For local\/domain users, this would be typically under C:\\Users\\&lt;username&gt;\\AppData\\Local\\Temp <\/li>\n<li class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">For service profiles (LocalSystem for e.g.), this would be under C:\\Windows\\ServiceProfiles\\NetworkService\\AppData\\Local\\Temp <\/li>\n<\/ul>\n<\/ul>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">7.&#160;&#160;&#160;&#160;&#160; Once you are done debugging, revert back the configuration file from the backup (really important as it would continue to log a lot of information).<\/p>\n<\/blockquote>\n<p class=\"MsoListParagraph\" style=\"margin: 0in 0in 0pt 0.5in;text-indent: -0.25in\"><font size=\"2\"><\/font><\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 0pt\"><b><font color=\"#000000\" size=\"4\">\n      <br \/>Enable <span style=\"color:\">Services <\/span>Logs on Release Management Server :<\/font><\/b><\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 0pt\"><font color=\"#000000\"><\/font>&#160;<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">In order to enable detailed logging on the Release Management Server for debugging purpose<\/p>\n<blockquote>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">1.&#160;&#160;&#160;&#160;&#160; Access the Release Management server machine. Find the configuration file under %Program Files(x86)%\\Microsoft Visual studio 12.0\\Release Management\\services directory. Backup the web.config file.<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">2.&#160;&#160;&#160;&#160;&#160; Edit the following section of web.config file. By default the tracing is enabled and logging is set to error. Change logging to filter=\u201dVerbose\u201d to get more detailed level logging.<\/p>\n<\/blockquote>\n<blockquote>\n<div>\n<pre class=\"csharpcode\"><span class=\"kwrd\">&lt;<\/span><span class=\"html\">configuration<\/span><span class=\"kwrd\">&gt;<\/span><br \/>\u2026<br \/><span class=\"kwrd\">&lt;<\/span><span class=\"html\">loggingConfiguration<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=&quot;Logging Application Block&quot;<\/span> <font style=\"background-color: #ffff00\"><span class=\"attr\">tracingEnabled<\/span><span class=\"kwrd\">=&quot;true&quot;<\/span><\/font> <span class=\"attr\">defaultCategory<\/span><span class=\"kwrd\">=&quot;General&quot;<\/span> <span class=\"attr\">logWarningsWhenNoCategoriesMatch<\/span><span class=\"kwrd\">=&quot;true&quot;<\/span><span class=\"kwrd\">&gt;<\/span><br \/>    <span class=\"kwrd\">&lt;<\/span><span class=\"html\">listeners<\/span><span class=\"kwrd\">&gt;<\/span><br \/>      <span class=\"kwrd\">&lt;<\/span><span class=\"html\">add<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=&quot;Rolling Flat File Trace Listener&quot;<\/span> <br \/>            <font style=\"background-color: #ffff00\"><span class=\"attr\">fileName<\/span><span class=\"kwrd\">=&quot;%TEMP%\\Microsoft\\ReleaseManagement\\12.0\\Logs\\ReleaseMananagementServices.log&quot;<\/span><\/font> <br \/>            <span class=\"attr\">formatter<\/span><span class=\"kwrd\">=&quot;Single <br \/>            Line Text Formatter&quot;<\/span> <br \/>            <span class=\"attr\">rollSizeKB<\/span><span class=\"kwrd\">=&quot;5000&quot;<\/span> <br \/>            <span class=\"attr\">rollFileExistsBehavior<\/span><span class=\"kwrd\">=&quot;Increment&quot;<\/span> <br \/>            <span class=\"attr\">timeStampPattern<\/span><span class=\"kwrd\">=&quot;yyyy-MM-dd&quot;<\/span> <br \/>            <span class=\"attr\">traceOutputOptions<\/span><span class=\"kwrd\">=&quot;None&quot;<\/span> <br \/>            <span class=\"attr\">listenerDataType<\/span><span class=\"kwrd\">=&quot;Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;<\/span> <br \/>            <font style=\"background-color: #ffff00\"><span class=\"attr\">filter<\/span><span class=\"kwrd\">=&quot;Error&quot;<\/span><\/font> <br \/>            <span class=\"attr\">type<\/span><span class=\"kwrd\">=&quot;Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;<\/span> <span class=\"kwrd\">\/&gt;<\/span><br \/>      <span class=\"kwrd\">&lt;<\/span><span class=\"html\">add<\/span> <span class=\"attr\">name<\/span><span class=\"kwrd\">=&quot;Formatted EventLog TraceListener&quot;<\/span> <br \/>            <span class=\"attr\">source<\/span><span class=\"kwrd\">=&quot;Release Management Services&quot;<\/span> <br \/>            <span class=\"attr\">formatter<\/span><span class=\"kwrd\">=&quot;Text Formatter&quot;<\/span> <br \/>            <span class=\"attr\">log<\/span><span class=\"kwrd\">=&quot;Application&quot;<\/span> <br \/>            <span class=\"attr\">machineName<\/span><span class=\"kwrd\">=&quot;&quot;<\/span> <br \/>            <span class=\"attr\">traceOutputOptions<\/span><span class=\"kwrd\">=&quot;None&quot;<\/span> <br \/>            <span class=\"attr\">listenerDataType<\/span><span class=\"kwrd\">=&quot;Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;<\/span> <br \/>            <font style=\"background-color: #ffff00\"><span class=\"attr\">filter<\/span><span class=\"kwrd\">=&quot;Error&quot;<\/span><\/font> <br \/>            <span class=\"attr\">type<\/span><span class=\"kwrd\">=&quot;Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;<\/span> <span class=\"kwrd\">\/&gt;<\/span><br \/>     <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">listeners<\/span><span class=\"kwrd\">&gt;<\/span><br \/>\u2026<br \/><span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">configuration<\/span><span class=\"kwrd\">&gt;<\/span><\/pre>\n<\/p><\/div>\n<div>&#160;<\/div>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">3.&#160;&#160;&#160;&#160;&#160; Save the web.config file. <\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">4.&#160;&#160;&#160;&#160;&#160; Reproduce the failing actions, detailed logs will get generated under C:\\Windows\\Temp\\Microsoft\\ReleaseManagment\\12.0\\Logs\\ReleaseManagementServices.log<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">5.&#160;&#160;&#160;&#160;&#160; Once you are done debugging, revert back the configuration file from the backup (really important as it would continue to log a lot of information).<\/p>\n<\/blockquote>\n<blockquote>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 0pt\"><font color=\"#000000\"><font size=\"2\"><span style=\"color:\"><\/span><\/font><\/font><\/p>\n<\/blockquote>\n<p><font face=\"Segoe UI\"><\/font><\/p>\n<p><strong><sub><font size=\"4\">Enable Logs on Release Management Monitor Service:<\/font><\/sub><\/strong><\/p>\n<p>In order to enable detailed logging on the Release Management Monitor Service for debugging purpose.<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">Access the Release Management Server machine. Backup and Edit the configuration file on similar lines. (Config file: %Program Files(x86)%\\Microsoft Visual studio 12.0\\Release Management\\bin\\ReleaseManagementMonitor.exe.config)<\/p>\n<p><strong><sub><font size=\"4\"><\/font><\/sub><\/strong><\/p>\n<p><strong><sub><font size=\"4\">Enable Logs on Release Management Client :<\/font><\/sub><\/strong><\/p>\n<p>In order to enable detailed logging on the Release Management Client for debugging purpose.<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">Access the Release Management Client machine. Backup and Edit the configuration file on similar lines. (Config file: %Program Files(x86)%\\Microsoft Visual studio 12.0\\Release Management\\Client\\bin\\ReleaseManagementConsole.exe.config)<\/p>\n<p class=\"MsoNormal\" style=\"margin: 0in 0in 8pt;line-height: 12pt\">&#160;<\/p>\n<p><a href=\"http:\/\/www.visualstudio.com\/explore\/release-management-vs\" target=\"_blank\">Release Management for Visual Studio 2013<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#160; Enable logs on Microsoft Deployment Agent: The first and most easy way to debug why an action\/component is failing is to open the logs available through the deployment step of your release within Release Management (RM) client. To do this, open your release, access the View Log section, click on the Details button of [&hellip;]<\/p>\n","protected":false},"author":62,"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-2113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ci","category-devops","category-git"],"acf":[],"blog_post_summary":"<p>&#160; Enable logs on Microsoft Deployment Agent: The first and most easy way to debug why an action\/component is failing is to open the logs available through the deployment step of your release within Release Management (RM) client. To do this, open your release, access the View Log section, click on the Details button of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/2113","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\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=2113"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/2113\/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=2113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=2113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=2113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}