An interesting hidden feature of the compiler is COMPILERDEBUG.
The COMPILERDEBUG setting in the USE.INI file for GCBASIC is used to enable or disable debugging features for the compiler. When the bits of the setting COMPILERDEBUG are set to 1, it activates additional debug information during compilation, which can be helpful for developers to diagnose and fix issues.
I do add more as I delve into the compiler. You can always see the permissible bits for COMPILERDEBUG first opening and closing the PREFERENCES editor, and then edit USE.INI. The help section will display the following:
To see the debug add or edit the [gcbasic] section of USE.INI.
[gcbasic]'change to a bitwise valuecompilerdebug=0
As I have already stated. This setting can be helpful for developers to diagnose and fix issues within the compiler.
I used COMPILERDEBUG very recently to isolate a compiler crash. The root cause was an unchecked assignment to a fixed array. Hugh did not do a lot of checking for constraints. So, using COMPILERDEBUG I was able to isolate quickly where the crash was occurring.
I hope this insight proves useful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
COMPILERDEBUG = 1023
methodstructuredebug = y
showprogresscounters = y
verbose = y
evbs = y
extendedverbosemessages = y
This will show the method ( sub/functions ) start and end, then
shows the method maps. then,
shows all the calls to sub, then.
show compilation of all subs, then
shows all calls to subs with parameters, then
all the calcs, then
setting of variables, then,
the state of all the pins.
then all the ASM converted into Hex.
There is more shown on more complex program.
A decent size program can generated 40k lines of debug. Hence, the bitwise settings to focus on specific areas. The standard GLCD calculator test generaets 23k lines of debug. So, see it all.... within GCCode change the settings/SCROLLBACK to 40000, then you press F2/Terminal: Select All, then, you can cut and paste.
Add I go I will add more and more debug to this capabillty. Meaning this is only showing a small part of what the compiler processes.
This is pretty hard to use when using SynWrite. But, I only use SynWrite when someone has an issue.
:-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
An interesting hidden feature of the compiler is COMPILERDEBUG.
The COMPILERDEBUG setting in the USE.INI file for GCBASIC is used to enable or disable debugging features for the compiler. When the bits of the setting COMPILERDEBUG are set to 1, it activates additional debug information during compilation, which can be helpful for developers to diagnose and fix issues.
I do add more as I delve into the compiler. You can always see the permissible bits for COMPILERDEBUG first opening and closing the PREFERENCES editor, and then edit USE.INI. The help section will display the following:
To see the debug add or edit the [gcbasic] section of USE.INI.
As I have already stated. This setting can be helpful for developers to diagnose and fix issues within the compiler.
I used COMPILERDEBUG very recently to isolate a compiler crash. The root cause was an unchecked assignment to a fixed array. Hugh did not do a lot of checking for constraints. So, using COMPILERDEBUG I was able to isolate quickly where the crash was occurring.
I hope this insight proves useful.
Wery interesting
To have real fun, and, blow your mind.
Set the following:
This will show the method ( sub/functions ) start and end, then
shows the method maps. then,
shows all the calls to sub, then.
show compilation of all subs, then
shows all calls to subs with parameters, then
all the calcs, then
setting of variables, then,
the state of all the pins.
then all the ASM converted into Hex.
There is more shown on more complex program.
A decent size program can generated 40k lines of debug. Hence, the bitwise settings to focus on specific areas. The standard GLCD calculator test generaets 23k lines of debug. So, see it all.... within GCCode change the settings/SCROLLBACK to 40000, then you press F2/Terminal: Select All, then, you can cut and paste.
Add I go I will add more and more debug to this capabillty. Meaning this is only showing a small part of what the compiler processes.
This is pretty hard to use when using SynWrite. But, I only use SynWrite when someone has an issue.
:-)