Thread Validator can be controlled from the command line prompt.
This tutorial describes in detail how to detect deadlocks in a child process launched from a process.
Sometimes the process you want to detect deadlocks for is not the process you are launching, but a process launched by that process.
Related tutorials:
Detecting deadlocks in a child process.
Detecting deadlocks in a service.
Detecting deadlocks in a service child process.
Detecting deadlocks in an IIS ISAPI DLL.
The command line is:
threadValidator.exe -program "c:\test results\testbed.exe" -programToMonitorEXE "<<Any>>" -programToMonitorLaunchCount 1 -saveSession "c:\test results\testFirstChildProcess.tvm" -hideUI
The above command line can be broken into its constituent items:
This command line runs testbed.exe but monitors the first program that testbed.exe launches. When the monitored program closes, the threading results are finalised and then saved to the session c:\test results\testFirstChildProcess.tvm. Finally, Thread Validator is closed.
The command line is:
threadValidator.exe -program "c:\test results\testbed.exe" -programToMonitorEXE "c:\test results\testbed_helper.exe" -programToMonitorLaunchCount 2 -saveSession "c:\test results\testbedHelper2.tvm" -hideUI
The above command line can be broken into its constituent items:
This command line runs testbed.exe but monitors the second launch of testbed_helper.exe. When the testbed_helper.exe closes, the threading results are finalised and then saved to the session c:\test results\testbedHelper2.tvm. Finally, Thread Validator is closed.
If you find writing command lines tiresome and you’d like some help, we have created a command line builder tool to make the process of creating command lines a lot easier.