oldhack wrote: the problem is the intrusive effect of the debug statements have on the execution timing of the code.
I'd never given much thought to the timing effects of my debugging code. In my experience, an application that needs particularly high resolution control over timing wouldn't be using basic as a programming language in the first place. I'll concede that there is most certainly overhead incurred when debugging in this manner.
I've found that most code that is so very particular regarding timing is poorly written in the first place (usually because I wrote it). Obviously, serial port and other timing critical tasks need to be handled correctly, but our wonderful virtual machine takes care of all that ugliness for us. What I mean are things like variables getting stepped on, or queue over/underruns. Typically, the problems arise when I don't use the proper techniques for handling the data, forgetting to set a semaphore or some such.
To put this perspective though, what are the timing effects of running a VB application from the IDE vs a compiled application? Is the application running in the IDE actually running at the proper speed? It might, I've never checked.
oldhack wrote:Besides, all the debug code is fugly, especially with all the #ifdef and #endif preprocessor instructions required to en/disable.
I'll have to respectfully dissagree on this one. While it is nice to have perfectly streamlined code with perfect indentation and no extraneious characters to muck things up, I personally prefer well commented and spaced out code. Typically, I'll place comment blocks around each logical function describing the functions purpose as well as it's dependancies and such. It takes up a tremendous amount of room with all of the included white space and extra lines, but it makes the application much easier to maintain and debug.
I didn't always have this opinion. Like yourself, I didn't want to have to add things that I thought were not really needed to my code. I have since gotten through that phase. Now, most of my code looks bloated and not tidy, although I can hand it to a complete stranger, and they would be able to understand and even maintain it if the need arose.
I too would like the ability to watch variables as they change, but to be honest, they usually change so fast that I'd miss it anyway, unless I'm single stepping, in which case the timing/speed issue becomes a moot point anyway.
As an aside, I'm interested in hearing your opinions primarily because those who post here regularly sing nothing but praise about the platform, and another point of view can be quite constructive sometimes.
-Don