By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,876 Members | 1,206 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,876 IT Pros & Developers. It's quick & easy.

Should Debug.Print be Remmed Out?

P: n/a
For an mdb or mde release, does having debug.print without the comment
single quote add any processing time to the application?

I assume an mde won't since debug.prints would not be compiled in the
final product, right?

But in an mdb, wouldn't debug.print add a bit of processing time,
however miniscule?

When developing, debug.prints still active where I don't need them can
be a pain and I take the time to comment them out, lest I be happy with
a debug.window full of SQL statements or whatever else I build up...

Thanks for any "comments", I won't, ' them out!!! 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Tim Marshall wrote:
For an mdb or mde release, does having debug.print without the comment
single quote add any processing time to the application?

I assume an mde won't since debug.prints would not be compiled in the
final product, right?

But in an mdb, wouldn't debug.print add a bit of processing time,
however miniscule?

When developing, debug.prints still active where I don't need them can
be a pain and I take the time to comment them out, lest I be happy
with a debug.window full of SQL statements or whatever else I build
up...

Thanks for any "comments", I won't, ' them out!!! 8)


No i don't think it adds any overhead, They are simply ignored. However i
supposed they still take up space and could be irrelevant after a time.
I simply do a search for debug.print and delete the lines as I find them. I
had alot of these and it wasn't too bad.

--
Nov 13 '05 #2

P: n/a
Deano wrote:
Tim Marshall wrote:
For an mdb or mde release, does having debug.print without the
comment single quote add any processing time to the application?

I assume an mde won't since debug.prints would not be compiled in the
final product, right?

But in an mdb, wouldn't debug.print add a bit of processing time,
however miniscule?

When developing, debug.prints still active where I don't need them
can be a pain and I take the time to comment them out, lest I be
happy with a debug.window full of SQL statements or whatever else I
build up...

Thanks for any "comments", I won't, ' them out!!! 8)


No i don't think it adds any overhead, They are simply ignored.
However i supposed they still take up space and could be irrelevant
after a time.
I simply do a search for debug.print and delete the lines as I find
them. I had alot of these and it wasn't too bad.


Sorry, correction if they are REMMED out of course they won't add overhead.
It rather depends I suppose what you're printing out and the complexity of
that code. For most everyday purposes I don't see much of a performance
hit - I like to take them out when they are not needed and to help tidy
things up.

To comment them out you could do a search and replace. I like to check that
each replacement is actually working rather than let it all happen at once.
--
Nov 13 '05 #3

P: n/a
Tim Marshall wrote:
For an mdb or mde release, does having debug.print without the comment
single quote add any processing time to the application?

I assume an mde won't since debug.prints would not be compiled in the
final product, right?

But in an mdb, wouldn't debug.print add a bit of processing time,
however miniscule?

When developing, debug.prints still active where I don't need them can
be a pain and I take the time to comment them out, lest I be happy with
a debug.window full of SQL statements or whatever else I build up...


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I use the Conditional Compilation Arguments under VBA module menu:

Tools > <application name> Properties.

fDebug = -1

Then in the code I just have this:

#If fDebug Then
Debug.Print ....
#End If

When I'm ready to deploy the application I just change the Conditional
Compilation Argument fDebug from -1 to 0; compile, compact & it's ready
to go.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQlLHSoechKqOuFEgEQKyIwCfY+7fpcK7wVia1va7XIprHx 3lXu0AnjyF
G1g4yig5j0khJmxhwXFfLv3k
=5dl1
-----END PGP SIGNATURE-----
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.