Why is the debugger so bad in Haskell? (or is it just me)

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/haskell

Our great sponsors
  • Scout APM - Truly a developer’s best friend
  • Zigi - The context switching struggle is real
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SonarQube - Static code analysis for 29 languages.
  • fused-effects-system

    Profiling for Haskell programs without recompiling, via fused-effects.

    Until some enterprising PhD student comes along and takes a whack at this problem, I debug my programs by: a) using pure functions whenever possible—I am bad at keeping track of imperative execution in my head, and as such pure functions help me avoid the associated mistakes, and what mistakes I do make are more apparent visually; b) using hedgehog or QuickCheck aggressively, so as to verify that the assumptions I’m making are correct; c) when writing imperative/effectful computation, building in logging from the get-go—I am a fused-effects user, so I use the built-in Trace effect as well as fused-effects-profile to yield information about what’s actually being executed.

  • DocTest

    An implementation of Python's doctest for Haskell (by sol)

    Try to restrict your types even on sub functions (inside where), use testing, break down your code to the most atomic parts, using ghci to debug each part once at a time, and because Haskell doesn't let you reuse variables, or mutate state, it's a lot easier to rationalize evaluation order (which makes it a lot easier to debug without step debuggers compared to languages like python).

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

  • ghc-whole-program-compiler-project

    GHC Whole Program Compiler and External STG IR tooling

    I can easily debug any Haskell program with the external STG interpreter. https://www.youtube.com/watch?v=DkDUEd3pUyM https://github.com/grin-compiler/ghc-whole-program-compiler-project

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts