In debugging a recent program I found it useful to add a line at the top of every function and sub such as;
By scanning down the log I can see the sequence of functions/subs that are running. So I can check that things are happening in the right order, no multiple loops, events are firing etc. Is this something I can already do in the IDE?, I can't see anything like this in the menus.VB Code:
Private Sub MySub If DebugMode Then WriteToLog("MySub")
Also, is there a string function or something that returns the name of the current sub/function? So I could do something like;instead of having to add the debug lines mentioned individually?VB Code:
Private Sub MySub If DebugMode Then WriteToLog(NiftyFunction.CurrentSubFunction)




Reply With Quote