In a recent project I made a module called
It’s very simple and doesn’t consume any extra memory or delays compared to using sertxd for debugging. You can also turn it on and off with a compiler directive.
The main benefit to me was program readability. It was nice to read code without needing extra comments, particularly when text was used in macros. Inside the macro you could debug out the text, using a lot of program space; or disable the debugging either by commenting out a line or turning the whole debugging off. Whatever you choose the PICAXE Editor keeps on displaying the bright red text as part of your program.
I couldn’t find anything similar on the forum, so I hope someone finds it useful.
There’s a lot help information in the file, just rename the extension from .bas to .basinc, or download it from here https://github.com/alnhnt/PICAXE/blob/main/Library/Debugger.basinc.
Debugger.basinc
. I found it quite useful so it’s here to share!It’s very simple and doesn’t consume any extra memory or delays compared to using sertxd for debugging. You can also turn it on and off with a compiler directive.
The main benefit to me was program readability. It was nice to read code without needing extra comments, particularly when text was used in macros. Inside the macro you could debug out the text, using a lot of program space; or disable the debugging either by commenting out a line or turning the whole debugging off. Whatever you choose the PICAXE Editor keeps on displaying the bright red text as part of your program.
I couldn’t find anything similar on the forum, so I hope someone finds it useful.
There’s a lot help information in the file, just rename the extension from .bas to .basinc, or download it from here https://github.com/alnhnt/PICAXE/blob/main/Library/Debugger.basinc.
Attachments
-
8 KB Views: 4