#MMDEBUG

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
#MMDEBUG ON
#MMDEBUG OFF
MMDEBUG
MMDEBUG BREAK

Description:

#MMDEBUG directive.
This has two forms #MMDEBUG ON and #MMDEBUG OFF.
By default #MMDEBUG is off.

These can appear anywhere in the program and are used by the program loader.
If #MMDEBUG is OFF (default condition) then any lines starting with the command MMDEBUG are ignored (effectively treated as comments) and will have absolutely zero impact on program performance - they are simply not loaded into program memory.
If #MMDEBUG is on then lines starting MMDEBUG are included in the program and the MMDEBUG command will be executed as follows

MMDEBUG command
By default the MMDEBUG command acts exactly like the PRINT command so you can use it liberally throughout your program during development and know that by simply setting #MMDEBUG OFF or removing any #MMDEBUG directives, your program will run normally without any impact on performance.

The second form of the MMDEBUG command is
MMDEBUG BREAK

in this case you get a command prompt
DEBUG>
Here you can execute any normal MMBASIC commands as though you were at the normal command prompt allowing you to change any variables, print them, or execute any other user subroutines or built in commands. Of course these should only be things that make sense at the command line (e.g. GOTO would be a BAD idea)
To exit this mode then use the command CONTINUE

MMDEBUG commands not at the start of a line will be included in the program and executed regardless

 

Last edited: 15 December, 2020