Ftp Object : Trace Method |
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.
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 _ ) |
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