visual basic 6编写的程序,在用户的机器上莫名奇妙的出错,错误没有规律可循。希望大家介绍一款vb异常记录的工具,可以记录出错的模块、行数和错误信息。
EurekaLog 能将错误报告记录在本地文件中。其报告可具体指出出错的代码行,以及机器当前信息、寄存器信息等重要诊断信息。但是EurekaLog 只支持Delphi、c++Builder、Visual Studio.net,没有vb6的版本。
vb6的也找了几个工具:VbCodeShield,SmartCheck、vb watch2,但是不是不好用、不适用,就是没有免费的软件。
EurekaLog 能将错误报告记录在本地文件中。其报告可具体指出出错的代码行,以及机器当前信息、寄存器信息等重要诊断信息。但是EurekaLog 只支持Delphi、c++Builder、Visual Studio.net,没有vb6的版本。
vb6的也找了几个工具:VbCodeShield,SmartCheck、vb watch2,但是不是不好用、不适用,就是没有免费的软件。
然后只要对相关的几个函数添加行号而已,如果安装了插件 MZ-Tools 只要点几下快捷栏按钮而已。
Private Sub lbl_DragOver(Index As Integer, Source As Control, x As Single, Y As Single, State As Integer)
'---ErrPtnr-OnError-START--- DO NOT MODIFY ! ---
On Error GoTo ErrPtnr_OnError
'---ErrPtnr-OnError-END--- DO NOT MODIFY ! ---
50011 Select Case Index
Case 3, 4
50030 If State = vbLeave Then
50040 With lbl(Index)
50050 .Drag vbEndDrag
50060 If .Tag = "1" Then
50070 .Font.Underline = True
50080 .ForeColor = &H808000
50090 Else
50100 .Font.Underline = False
50110 .ForeColor = &H8000&
50120 End If
50130 End With
50140 End If
50150 End Select
'---ErrPtnr-OnError-START--- DO NOT MODIFY ! ---
Exit Sub
ErrPtnr_OnError:
Select Case ErrPtnr.OnError("frmAbout", "lbl_DragOver")
Case 0: Resume
Case 1: Resume Next
Case 2: Exit Sub
Case 3: End
End Select
'---ErrPtnr-OnError-END--- DO NOT MODIFY ! ---
End Sub
...C:\pdfcreator\trunk\Common\PDFCreator_ErrPtnrDialog.frm...
Public Function OnError%(AktModul$, AktProc$, Optional ContBits% = 255)
'.------------------------------------------------------------------------------
'. Function : The automatic error handler routines inserted in the project by
'. ErrorPartner call this function.
'. 1. identify the error conditions
'. 2. display the error dialog (modal)
'. 3. Return the contionuation code to the calling function
'.------------------------------------------------------------------------------' fill the dialog's label captions
lblError(0) = Err.Number & " (" & Err.Description & ")"
lblError(1) = AktModul$
lblError(2) = AktProc$
lblError(3) = Erl' create programm information
If Len(ProgInfo$) = 0 Then ProgInfo$ = App.EXEName + " V" & App.Major & "." & App.Minor & "." & App.Revision
Caption = ProgInfo$ + " - Error message"
Screen.MousePointer = vbDefault' fill the CallStack-listbox
CallStack2Listbox' build the error dialog
BuildDialog ContBits%' write the log file
If ErrPtnr_LogFile% Then WriteLogfile' display the dialog
Beep
Show vbModal' return the continuation code to the calling procedure
OnError% = Continuation%End Function...