The Troubleshooting methods/functions can be used to control the functionality associated with the Troubleshooting window.
IsDebugLoggingEnabled
SetDebugLoggingEnabled
GetDebugLoggingDirectory
SetDebugLoggingDirectory