gawk: Awk Debugging

1 
1 14.1.3 'awk' Debugging
1 ----------------------
1 
1 Debugging an 'awk' program has some specific aspects that are not shared
1 with programs written in other languages.
1 
1    First of all, the fact that 'awk' programs usually take input line by
1 line from a file or files and operate on those lines using specific
1 rules makes it especially useful to organize viewing the execution of
1 the program in terms of these rules.  As we will see, each 'awk' rule is
1 treated almost like a function call, with its own specific block of
1 instructions.
1 
1    In addition, because 'awk' is by design a very concise language, it
1 is easy to lose sight of everything that is going on "inside" each line
1 of 'awk' code.  The debugger provides the opportunity to look at the
1 individual primitive instructions carried out by the higher-level 'awk'
1 commands.
1