DEBUG {var}

Var - is an optional variable value (e.g. b3). Its value is not of importance and is included purely for backwards compatibility with older programs.


Display variable information in the debug window when the debug command is processed.

Byte information is shown in decimal, binary, hex and ASCII notation. Word information is shown in decimal and hex notation. The debug command uploads the current variable values for *all* the variables via the download cable to the computer screen. This enables the computer screen to display all the variable values in the microcontroller for debugging purposes.

Note that the debug command uploads a large amount of data and so significantly slows down any program loop. To display user defined debugging messages use the sertxd command instead. Note that on 08 and 14 pin chips debug acts on 'B.0 / output 0'. Therefore programs that use output 0 may corrupt the serial data condition. In this case it is recommended to use the following structure before a debug command.

low B.0 ; reset B.0 to correct condition
pause 500 ; wait a while
debug ; display values on computer screen
Applies To:
See Also:
Related Create:

Debug data

Display the value of all variable on a computer

Code Example:
main:	inc b1		; increment value of b1
	readadc A.2,b2	; read an analogue value
	debug		; display values on computer screen
	pause 500	; wait 0.5 seconds
	goto main	; loop back to start
Copy Code Submit an Example

Submit Your Own Code!

You must be logged in to submit code examples. Login now.


  • Login to leave a comment.