I was working in some old VB6 Code and thought of this method:
Create a Sub CodeOutline ( Order as Double, Description as string)
Then call it at various places in the code:
CodeOutline 1, "App Starts"
CodeOutline 2, "Load Settings"
CodeOutline 3, "Start Lession" (this is educational software to it has "lessons and exercises"
CodeOutline 4, "Next Exercise"
CodeOutline 5, "Lesson Finished"
Now you can do a couple of things:
- In the above Sub you can put a debug statement. (We have a "debug mode" we can put the app in where any debug message will be reported as a msgbox).
CodeOutline (Order as double, descr as string)
SysMsg cstr(Order) & " -" & Descr, Msg_Debug
end
You can also put a breakpoint in the CodeOutline
You can search on CodeOutline and get a list (often sorted by the Order paramater if you're using the MzTools's vb6 addin search function (far superior to the built in vb6). And the search results are hyperlinked.
EXAMPLE OF THE SEARCH RESULTS
Tutor
Modules
COMMON (COMMON.BAS)
Sub Main()
CodeOutline 1, "Startup"
CodeOutline 6, "Checking Registration status"
CodeOutline 4, "Loading Splash Screen"
Public Sub CodeOutline(Order As Double, sDescription As String)
Public Sub CodeOutline(Order As Double, sDescription As String)
' do a Search on CodeOutline to see all the code outlines
On Error GoTo CodeOutline_Error
CodeOutline_Error:
sysMsg "Error " & Err.Number & " (" & Err.Description & ") in procedure CodeOutline of Module COMMON" & ",," & Err.Description, MSG_LOG
IO (IO.BAS)
Sub APP_INITIALIZE()
CodeOutline 2, "Initializine App"
CodeOutline 3, "Exiting from App_initialize"
Forms
frmSplash (SPLASH.FRM)
Private Sub Command2_Click(index As Integer)
CodeOutline 4.1, "User Clicked button # " & index & " on Splash screen"
Private Sub Form_Load()
CodeOutline 5, "Exiting from frmSplash.Load"
Private Sub tmrUnload_Timer()
CodeOutline 6, "Preparing to unload the Splash Form, tmrUnload"