The GHCi Debugger project extends ghci with basic debugging capabilities. See the GHC user docs for more info.
The debugger is available since GHC 6.8.1. Full documentation in the user docs.