Dart Telnet Control
Trace Method
An undimensioned string dynamically expanded to contain trace data or a filename that is used to store all trace data. If not provided or a Null value, then trace data is no longer stored.
Defaults to False. A True value indicates that sent data should be traced.
Defaults to False. A True value indicates that received data should be traced.
Prompt to precede sent data.
Prompt to precede received data.
Description

Start or stop the accumulation of trace or debug data. Once started, this method accumulates data until it is turned off.

This method provides a convenient mechanism for viewing all data being sent and received over the connection and can be used to troubleshoot host interoperability issues and expose protocol communications.

Syntax
Visual Basic
Public Sub Trace( _
   Optional ByRef Result As Variant, _
   Optional ByVal Send As Boolean = False, _
   Optional ByVal Receive As Boolean = False, _
   Optional ByVal SendPrompt As String, _
   Optional ByVal ReceivePrompt As String _
) 
Parameters
Result
An undimensioned string dynamically expanded to contain trace data or a filename that is used to store all trace data. If not provided or a Null value, then trace data is no longer stored.
Send
Defaults to False. A True value indicates that sent data should be traced.
Receive
Defaults to False. A True value indicates that received data should be traced.
SendPrompt
Prompt to precede sent data.
ReceivePrompt
Prompt to precede received data.
Remarks
ReceivePrompt and SendPrompt allow the application to specify what delimiters separate and label data being captured.
Example
Private Sub Command1_Click()
On Error GoTo OnError ' use intrinsic error handling
	Tcp1.Trace "Debug.txt", True, True, vbCrLf & "Sent: ", vbCrLf & "Recv: "
	Exit Sub
OnError: ' Any error jumps here
	Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
 
Private Sub Command2_Click()
On Error GoTo OnError ' use intrinsic error handling
	Tcp1.Trace
	Exit Sub
OnError: ' Any error jumps here
	Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
See Also

Telnet Object  | Telnet Members


Documentation Version 1.9.3.0
© 2020 Dart Communications. All Rights Reserved.
Send comments on this topic