Leaving DEBUG in my PBasic Code
G McMurry
Posts: 134
This is something I have always wondered about but never taken the time to ask anyone...
Today I am hammering away at a new piece of PBasic that I need to run as quickly as possible. I am using the BS2SX. During the development process, I use extensive DEBUG commands that slow my program considerably writing all that data to my workstation.
So, here's my question:
If the Editor is not hooked up to the Basic Stamp, do lines of code that call DEBUG routines, take up any time?
I often put a GOSUB command in my main loop to call DEBUG subroutines. If I comment out the GOSUB call, the DEBUG subroutines the debug window to open, even though it doesn't show anything. Is that taking any time away from the rest of my operations?
Greg
Today I am hammering away at a new piece of PBasic that I need to run as quickly as possible. I am using the BS2SX. During the development process, I use extensive DEBUG commands that slow my program considerably writing all that data to my workstation.
So, here's my question:
If the Editor is not hooked up to the Basic Stamp, do lines of code that call DEBUG routines, take up any time?
I often put a GOSUB command in my main loop to call DEBUG subroutines. If I comment out the GOSUB call, the DEBUG subroutines the debug window to open, even though it doesn't show anything. Is that taking any time away from the rest of my operations?
Greg
Comments
I use the following around DEBUG statements to quickly remove them
Set #DEFINE DIAG = 0 to skip the DEBUGs and not open the terminal window.
You can also get creative and use different values for DIAG to set levels of debugging.
Makes sense to me!