Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Following code as it executes 1

Status
Not open for further replies.

VicM

Programmer
Sep 24, 2001
442
0
16
US
Is there any tool within Access (or elsewhere) that allows documenting each line of code as it executes?

I'm aware of stepping thru the code manually and using Watch statements, etc., but was wondering if the executing lines can be documented in the order they execute. It may be more helpful, when there are many calls to other subs and functions, to see just what and where the code is doing and going.

If this tool doesn't exist, maybe some of you talented folks can conjure it up!

Thanks,

Vic
 
Vic,

I am not aware of any feature to watch code as it executes. What I often do for debugging is the following:

Add a line in each or selected procedures to indicate that procedure has been entered. You can also include Now() to show the time.

I add a global boolean variable to allow this "feature to be turned on/off. You set the ShowDebug to True/False before running your code

For example:

Code:
 Sub GetClient()

If ShowDebug then 
debug.print "Entered GetClient : " & Now
'other code in GetClient goes here

Not elegant, but it works.

Good luck.
 
jedraw,

Very nice suggestion! I like it!

A star for you.

Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top