This is a complete rewrite of the Korn Shell debugger from Bill Rosenblatt's `Learning the Korn Shell', published by O'Reilly and Associates (ISBN 1-56592-054-6) with changes by Michael Loukides and Cigy Cyriac. However, this code now depends on a number of debugging support features that are neither part of the POSIX standard nor present are in many POSIX-like shells. Although you can just use bashdb to debug scripts written in BASH, it can also be used just as a front-end for learning more about programming in BASH. As an additional aid, the debugger can be used within the context of an existing script with its functions and variables that have already been initialized; fragments of the existing code can be experimented with by changing them inside the debugger.