Quick Start – Tracing Remote SubAgents
Please see the detailed discussion on Remote Subagents provided in the ‘Remote Subagent’ section in the Reference. This section will show you how to enable tracing in the remote subagents. This feature can be used to debug the communication and other issues related to remote subagents.
In order to enable the tracing in a remote subagent, we need to uncomment a couple of lines in the remote agent source. In main.cpp of remote subagent project, you will find the following comments.
By uncommenting NDTRACE, the tracing will be enabled. You will see the following messages to the standard output when the remote subagent is run with tracing enabled.
The code for the remote subagent makes the calls to NDSATRACE, to output messages. E.g. NDSATRACE( "ping timeout #%d, sysUpTime=%d\n", countTimeout, m_sysUpTime ); The arguments passed to this tracing function are the same as ‘printf’ function. By default, the output goes to the standard output. However, the output can also be sent to a file using code shown below.
The above descriptions showed how to turn on tracing within the remote subagent. Tracing can also be turned in the master agent by uncommenting NDTRACE in the main.cpp of the master agent.