We have debuggers for bash.
The Heirloom Project provides standard Unix utilities.
Rootsh is a wrapper for shells which logs all echoed keystrokes and terminal output to a file and/or to syslog. It's main purpose is the auditing of users who need a shell with root privileges. They start rootsh through the sudo mechanism.
sudosh is a sudo shell, filter and can be used as a login shell. Sudosh records all keystrokes and output and can play back the session as just like a VCR.