Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Expertise: Beginner
Aug 6, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Build Debugging/Profilling Into Your Code

To build debugging and profiling into your code, add this to the end of code lines:
 'Code line Add this line (n should be replaced
'by a unique number)
i = j + 1 '*dbg* "Debug n" & time
Turn debugging/profiling on by simply doing a replace on all modules of '*dbg* with :debug.print. When you run your code, the output will be sent to the debug window. To turn off debugging/profiling, replace :debug.print with '*dbg.* Even more interesting is the fact that you can do this at the procedure level as well. For example:
 Sub Form_Load () '*dbg* "form_load:" & Time;
after replacement:
 Sub Form_Load () : Debug.Print "form_load:" & Time;
Finally, if you like, you can change '*dbg* to a procedure name that could write all output to a file.
Robert Meyering
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date