Posts: 348
Threads: 25
Joined: Jul 2022
Reputation:
20
Hi
1. I remember that someone uses to print on the console to have debug output on another window aside that of the running program.
I sometimes used this way.
2. in More cases I used to print before and after the block of code that doesn't work as aspected, and this way fixes the 80-90% of bugs.
After print the variables values, the program stops its flow for a SLEEP or a _DELAY.
3. I rarely print variables variations into a file for analizing it in a second time.
and if I think that there is a logic bug, I allow the flow of code to drive me to the bug.
PS:
Option _Explicit & Option _ExplicitArray save so much time! I often mistype the name of variables! I more less declare a wrong data type among MAIN, SUB & FUNCTION parameters, in the SUB & FUNCTION with SHARED. (i.e. integer vs single vs long)
My two cents
PPS:
Knowing in what SUB/FUNCTION we are give us poor informations...I suggest you to follow the flow on the paper or using the Debug F7/F8 to execute step by step the code.