Trace Property  

Enable or disable socket function level tracing.


object.Trace [= { True | False } ]


The Trace property is used to enable or disable the logging of Windows Sockets function calls. When enabled, each function call is logged to a file, including the function parameters, return value and error code if applicable. This facility can be enabled and disabled at run time, and the trace log file can be specified by setting the TraceFile property. All function calls that are being logged are appended to the trace file, if it exists. If no trace file exists when tracing is enabled, the trace file is created.

The tracing facility is available in all of the networking controls, and is enabled or disabled for an entire process. This means that once tracing is enabled for a given control, all of the function calls made by the process using any of the SocketTools controls will be logged. For example, if you have an application using both the FTP and POP3 controls, and you set the Trace property to True on the FTP control, function calls made by both the FTP and POP3 controls will be logged. Additionally, enabling a trace is cumulative, and tracing is not stopped until it is disabled for all controls used by the process.

If tracing is not enabled, there is no negative impact on performance or throughput. Once enabled, application performance can degrade, especially in those situations in which multiple processes are being traced or the trace file is fairly large. Since trace files can grow very quickly, even with modest applications, it is recommended that you delete the file when it is no longer needed.

When debug logging is enabled for HTTP/2 client sessions, it is normal to see HTTP/1.1 in the request and server response. HTTP/2 is a binary protocol and the request and response header blocks emulate a standard HTTP/1.1 text response for backwards compatibility. Applications running on the server should work in the same way regardless of which protocol version is selected, however it is possible to check the server environment to determine which version of HTTP was used with the request.

Note that only those function calls made by the SocketTools networking controls will be logged. Calls made directly to the Windows Sockets API, or calls made by other controls, will not be logged.

Data Type


See Also

TraceFile Property, TraceFlags Property