wiki:GhcDebuggers

Version 3 (modified by guest, 7 years ago) (diff)

--

Debugging Support Efforts in GHC

There are various efforts to add Haskell-level debugging support to GHC. This page summarizes them.

The Ghci Debugger

The Ghci Debugger was developed under the Google SoC initiative. The implementation is an extension to Ghci, called at debug time, and the main contributions are

  • A closure viewer, capable of showing intermediate computations without forcing them, and without depending on types (and of course that excludes dependency on Show instances)
  • Adding a basic breakpoint primitive to use in a system of dynamic breakpoints for ghci, which calls ghci in the correct scope.
Status: Implemented, ???
Video: ???

The Hpc Tracer (HpcT)

The Hpc Tracer is a dynamic tracer for Haskell Program Coverage information. HpcT allows you to single step through your program, seeing exactly what part of the code was executed when. It also support viewing exception and thread change events, as well as providing a 'Step Back' button which allow you to rewind your program to see what path you took to get to a problematic piece of code (for example head []).

The primary weakness is the inability to see live data structures; this debugger/tracer is silent, you can see where you are but not any of your values.

Status: Implemented, ???
Video: http://movies.unsafeperformio.com/hpctpreview2.mov

Merging the two designs

The plan is to take the best ideas from both debuggers and combine them into an even better debugger.

Currently GhciD has support for displaying local variables, but HpcT does not. However, HpcT has more efficient breakpoints.