\tracingall=1
\newcount\n \n=20
\loop\the\n \advance\n by-1 \ifnum\n>0 \repeat
\bye
will get out like:
*\loop #1\repeat ->\def \body {#1}\iterate
#1<-\the \n \advance \n by-1 \ifnum \n >0
{\def}
\iterate ->\body \let \next \iterate \else \let \next \relax \fi \next
\body ->\the \n \advance \n by-1 \ifnum \n >0
{\the}
{the character 2} % here should be 20
{\advance}
{\ifnum}
{true}
{\let}
{\else}
\next ->\body \let \next \iterate \else \let \next \relax \fi \next
\body ->\the \n \advance \n by-1 \ifnum \n >0
{\the}
{the character 1} % here lost number 9, actually should be 19
In summarise, if \n
is greater than 10, tracing output log will only get the 1st number and lost the latter.
\tracingall
doesn't take a value; it's a declaration that sets several values. In order to turn it off, use\tracingnone
.