The first thing we should do while running a debugger to investigate a problem, is to put in a breakpoint otherwise the program will run as if it was not under the debugger. The break command or its shortcut, b is used to set the breakpoint with any of the following arguments:
- break function_ name: Sets the breakpoint at the entry to the first instruction of the function
- break line-number (n): Sets the breakpoint at the line number n in the current source file
- break filename:n: Sets the breakpoint at the line number n in the specified source filename
Each breakpoint is designated a number that can be used to delete it from the breakpoint list, using the delete command.
In our example, the file calc.awk has four functions. ...