You can display the register state of the current context using the Debug.printregisters method, the local variables of the current context using the Debug.printlocals() method and the global variables by using the Debug.printglobals() method. To display single variables, use the Debug.print("expr"[,"format"]) method. For example, where int i = -1:

>Debug.print("i")
0xffffffff
>Debug.print("i", "d")
-1
>Debug.print("i, "u")
4294967295

You can change the default radix, used when printing numbers, with the Debug.setprintradix(radix) method. For example:

>Debug.setprintradix(10)
>Debug.print("i")
-1
>Debug.setprintradix(8)
>Debug.print("i)
037777777777

The Debug.print method is used to access registers…

>Debug.print("@pc")
0x000002ac

…and memory, too:

>Debug.print("((unsigned[2])0x0)")
[0xeafffffe, 0xe59ff018]

You can use the print method to update variables, registers, and memory using assignment operators:

>Debug.print("x=45")
0x0000002d
>Debug.print("x+=45")
0x0000005a

You can change whether character pointers are displayed as null-terminated strings using the Debug.setprintstring(bool) method. For example, where const char *string = "hello":

>Debug.print("string")
hello
>Debug.print("string", "p")
0x00000770
>Debug.setprintstring(false)
>Debug.print("string")
0x00000770
>Debug.print("string", "s")
hello

To change the maximum number of array elements that will be displayed, use the Debug.setprintarray(n) method. For example, where unsigned array[4] = {1, 2, 3, 4 }:

>Debug.print("array","d")
[1, 2, 3, 4]
>Debug.setprintarray(2)
>Debug.print("array","d")
[1, 2]

You can use the Debug.evaluate(expr) method to return the value of variables rather than displaying them. For example…

>x=Debug.evaluate("x")
>if (x==-1) Debug.echo("x is 45")
x is 45

…where the method Debug.echo(str) outputs its string argument.