How to debug Release Management components

How to debug Release Management components

Rate This
  • Comments 1

 

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 the deployment step that failed and requires debugging.


If that step does not provide enough information about the error follow these steps:


Option A:


If identity running the Deployment Agent service is a “Service User” in RM:

1.   In Windows Services, stop the Microsoft Deployment Agent Service

2.   Run the DeploymentAgent.exe located in %Program Files(x86)%\ Microsoft Visual studio 12.0\Release Management\bin with “debug” option from command line. (DeploymentAgent.exe debug start)


Or

Option B:

1.      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.

2.      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=”Verbose” to get more detailed level logging.

<loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
...
<listeners>
<add name="Rolling Flat File Trace Listener"
formatter="Single Line Text Formatter"
traceOutputOptions="None"
filter="Error"
fileName="%TEMP%\Microsoft\ReleaseManagement\12.0\Logs\DeploymentAgent.log"
rollSizeKB="5000"
rollFileExistsBehavior="Increment"
timeStampPattern="yyyy-MM-dd"
type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</listeners>
...
</loggingConfiguration>

3.      Save the Deploymentagent.exe.config file.

5.      In Windows services. Restart the windows service “Microsoft Deployment Agent”.

6.      Reproduce the failing deployment, detailed logs will get generated under the TEMP directory of the user the “Deployment Agent” running as. For e.g.

    • For local/domain users, this would be typically under C:\Users\<username>\AppData\Local\Temp
    • For service profiles (LocalSystem for e.g.), this would be under C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp

7.      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).


Enable Services Logs on Release Management Server :

 

In order to enable detailed logging on the Release Management Server for debugging purpose

1.      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.

2.      Edit the following section of web.config file. By default the tracing is enabled and logging is set to error. Change logging to filter=”Verbose” to get more detailed level logging.

<configuration>

<loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
<listeners>
<add name="Rolling Flat File Trace Listener"
fileName="%TEMP%\Microsoft\ReleaseManagement\12.0\Logs\ReleaseMananagementServices.log"
formatter="Single
Line Text Formatter"

rollSizeKB="5000"
rollFileExistsBehavior="Increment"
timeStampPattern="yyyy-MM-dd"
traceOutputOptions="None"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
filter="Error"
type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="Formatted EventLog TraceListener"
source="Release Management Services"
formatter="Text Formatter"
log="Application"
machineName=""
traceOutputOptions="None"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
filter="Error"
type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</listeners>

</configuration>
 

3.      Save the web.config file.

4.      Reproduce the failing actions, detailed logs will get generated under C:\Windows\Temp\Microsoft\ReleaseManagment\12.0\Logs\ReleaseManagementServices.log

5.      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).

Enable Logs on Release Management Monitor Service:

In order to enable detailed logging on the Release Management Monitor Service for debugging purpose.

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)

Enable Logs on Release Management Client :

In order to enable detailed logging on the Release Management Client for debugging purpose.

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)

 

Release Management for Visual Studio 2013

Leave a Comment
  • Please add 5 and 5 and type the answer here:
  • Post
  • Thanks Roopesh for the useful tips!

Page 1 of 1 (1 items)