Synopsis
int debug_scanf(const char *format,
                ...);
Description

debug_scanf reads from the Debug Terminal, under control of the string pointed to by format that specifies how subsequent arguments are converted for input. The format string is a standard C scanf format string. The actual formatting is performed on the host by the debugger and therefore debug_scanf consumes only a very small amount of code and data space, only the overhead to call the function.

If there are insufficient arguments for the format, the behavior is undefined. If the format is exhausted while arguments remain, the excess arguments are evaluated but are otherwise ignored.

debug_scanf returns number of characters read, or a negative value if an output or encoding error occurred.