Skip to content
Rob van Oostenrijk edited this page May 15, 2014 · 1 revision

Introduction

Quick steps to get the TcmDebugger configured and running.

Building TcmDebugger

In order to build TcmDebugger, the required dependencies need to be obtained from a working Tridion installation.

To simplify this, a small tool is included (with source) called TcmDependencies. It will interface directly with the GAC (Global Assembly Cache) in order to retrieve the required files.

C:\temp>TcmDependencies.exe C:\temp\TcmDebuggerDependencies

[i] Extracted Tridion.Common.Core from Global Assembly cache.
[i] Extracted Tridion.Common from Global Assembly cache.
[i] Extracted Tridion.ContentManager.Common from Global Assembly cache.
....
[i] Extracted web\TemplateBuilder\Tridion.ContentManager.Templating.CompoundTemplates.DomainModel.dll.deploy from Tridion installation.

After this simply copy the assemblies from the TcmDependencies output folder to the dependencies folder in the TcmDebugger project (or place them in the TcmDebugger.exe folder when using a binary build)

Configuring TcmDebugger

After downloading and compiling the latest version of TcmDebugger take the following steps:

  • Open the TcmDebugger.exe.config

  • Add the Content Manager database details

      <database name="database-name" server="database-server" username="database-user" password="database-password" />
    
  • Add the Content Manager website URL (same instance as the database) and configure the preview directory to a locally writable directory

      <cms url="http://mycmsserver/" previewDirectory="D:\Temp\TridionOutput\"  ... />
    
  • Configure the class libraries you are debugging. Additionally ensure these libraries (including their PDB's are available in the TcmDebugger directory.

      <debugging enableBreakpoint="true">		
          <debugAssembly name="Company.Templating.MyAssembly" />
          <debugAssembly name="Company.Templating.AnotherAssembly" />
      </debugging>
    

    Note: It is best to setup as an automated post-build copy event in your Visual Studio class library project to copy updated libraries to the TcmDebugger directory.

Configuring Visual Studio

Visual Studio Properties

  • Configure TcmDebugger as an external application for your class library and configure the library to debug as the startup project of the solution. This allows Visual studio to automatically start TcmDebugger and attach to the process.

  • Add Command line arguments on the TcmDebugger properties

      Syntax:
          --item <component uri> --template <component compound template uri>
          // or 
          -i <page uri> -t <page compound template uri>
      Example:
          -i tcm:123-123456-64 -t tcm:123-987654-128
    
  • Finally start the debug session in Visual Studio which will launch TcmDebugger. TcmDebugger will automatically pause when the configured debug assemblies are loaded and breakpoints can be placed.

Clone this wiki locally