Citrix Troubleshooting - How to collect Microsoft TTD (Time Travel Debugging) trace for a Citrix process

book

Article ID: CTX695114

calendar_today

Updated On:

Description

Prerequisites
1. Download Microsoft TTD Utility installer from Microsoft official website.
2. Run the installer and select "Install". 
3. Once the installation done, the TTD command is added to the system path and is available for use at the command prompt.

Important Note:
At the very first time of running TTD.exe, you will be prompted with Microsoft EULA (End-User License Agreement) acceptance to proceed.


Start TTD Tracing
1. Launch a "Command Prompt" instance.
2. Locate the PID of the concerned process by 'Tasklist' command-line or Windows task manager UI.
3. Attach TTD to the concerned Citrix process by running the following command-line. You may customize the output path as desired.

TTD.exe -attach <pid> -out C:\temp

4. Once the command-line is successfully executed, two files will be auto generated under the specified output path and written by TTD, one named xxx01.run and another named xxx01.out. Herein, xxx stands for the process name.

Stop TTD Tracing
1. Reproduce the performance issue.
2. Launch another "Command Prompt" instance, and stop TTD tracing for the concerned Citrix process by running the following command-line.

TTD.exe -stop <pid>

3. Once the command-line is successfully executed, the "TTD.exe -attach" running in the first "Command Prompt" instance is expected to return automatically with no error or failure. 
4. Gather the .run and .out file from the specified output path.

Important Note: 
According to TTD Utility's statement, .run file may contain personally identifiable or security related information, including but not necessarily limited to file paths, registry, memory or file contents. Exact information depends on target process activity while it was recorded. Please be aware of this when sharing with other people.
.out file contains additional information about the recording session.

Example - Collect TTD trace for Citrix PicaShell.exe

"Command Prompt" instance 1

> TASKLIST /FI "IMAGENAME eq PicaShell.exe"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
PicaShell.exe                17228 Console                    2     30,564 K


> TTD.exe -attach 17228 -out C:\temp

Microsoft (R) TTD 1.01.11 x64
Release: 1.11.532.0
Copyright (C) Microsoft Corporation. All rights reserved.

Attaching to 17228
  (PID 17228: C:\Program Files (x86)\Citrix\HDX\bin\PicaShell.exe)
    Initializing the recording of process (PID:17228) on trace file: C:\temp\PicaShell01.run
    Recording has started of process (PID:17228) on trace file: C:\temp\PicaShell01.run


"Command Prompt" instance 2

> TTD.exe -stop 17228
Microsoft (R) TTD 1.01.11 x64
Release: 1.11.532.0
Copyright (C) Microsoft Corporation. All rights reserved.

Warning:  Option '-InjectMode' was unused
Full trace written to 'C:\temp\PicaShell01.run'


"Command Prompt" instance 1

> TTD.exe -attach 17228 -out C:\temp

Microsoft (R) TTD 1.01.11 x64
Release: 1.11.532.0
Copyright (C) Microsoft Corporation. All rights reserved.

Attaching to 17228
  (PID 17228: C:\Program Files (x86)\Citrix\HDX\bin\PicaShell.exe)
    Initializing the recording of process (PID:17228) on trace file: C:\temp\PicaShell01.run
    Recording has started of process (PID:17228) on trace file: C:\temp\PicaShell01.run
(x86) (PID:17228): Recording stopped after 309656ms
  Full trace dumped to C:\temp\PicaShell01.run

> Dir C:\temp

 Directory of C:\temp

08/22/2025  04:20 PM    <DIR>          .
08/22/2025  04:25 PM             2,140 PicaShell01.out
08/22/2025  04:23 PM       125,829,120 PicaShell01.run

Issue/Introduction

In troubleshooting Citrix performance issues, like hang-up or slow responsiveness, or other issue types that require a deeper debugging, you might be asked by Citrix Support to collect Microsoft TTD (Time Travel Debugging) trace for a continuous memory recording of the concerned Citrix process. The article describes the main steps of the TTD trace collection.