New Haskell Debugger Release: v0.13

I’m happy to announce a new release of the new modern step-through interactive debugger (haskell-debugger). You can find installation instructions at GHC Debugger.

Here’s the changelog for haskell-debugger-0.13:

Features:

  • Launch the external-interpreter by default directly in the User’s Terminal. That is, the VSCode
    terminal will interpret the debuggee directly, and the stdin/stdout connect will be connected to that terminal.
  • Add support for import Module statements at the debug REPL.
  • Add logpoints support.
  • Support for nightly GHC 9.15, leveraging external interpreter commands.

Bug fixes:

  • Fix: Import failed where depended-upon package was incorrectly considered hidden
  • Fix: Respond cleanly to DAP client with ErrorResponse on exceptions, rather than crashing the session.
  • Fix: terminate/disconnect/terminated wasn’t following DAP properly, resulting in premature exiting crashes
  • Fix: Debugger.View.Class cannot be found in certain multi-repl sessions
  • Fix: Make custom DebugViews instances work for newtypes
  • Fix: Display more unevaluatable closures as <fn> rather than as thunks _
  • Fix: Inherit the language extensions at any given breakpoint source to the REPL
  • Fix: Don’t print certain evaluation results in duplicate
  • Fix: Set scopeExpensive=true for Module and Global

Additionally, the debugger internals and the testsuite were considerably
refactored and improved, paving the way for better, faster changes, with more
confidence.

The debugger is supported starting from GHC 9.14, so do try it out on your project if you can.
Bug reports are welcome at github.com:well-typed/haskell-debugger!

This work is sponsored by Mercury and implemented by me (Rodrigo), Andrea Vezzosi, and @fendor, at Well-Typed

21 Likes

Thank you very much! Looking really good here from a quick test, at least until I stepped too far and hit

Failed to decode the stack with Invalid large bitmap size 0.
This is likely bug #26640 in the decoder, which has been fixed for 9.14.2 and forward. No StackTrace will be returned...

Thanks! That bug mentioned is fixed in master, just not released.

Fortunately, that error message just means the stack decoding is broken at that location. This typically only happens on top-level functions. If you step further into other functions you should find a better stack trace (even more so with IPE information) and no longer get that message.

That error doesn’t prevent debugging, just disables the stack trace when it happens.

Do open bug reports if you find anything more, happy to have them!