GHC Plugin for Setting Breakpoints
summary
A GHC plugin implements breakpoints that actually pause all threads in concurrent programs and does not require the bytecode interpreter, using a renamer plugin to capture in-scope bindings and a typechecker plugin to print values including unlifted ones via showLev. Breakpoint API variants like breakpointIO and a non-halting queryBars exist, pausing via an unsafe foreign call hack (fixed CPU issue on GHC 9.2) and even manipulating the RTS priority queue to suspend timeouts.
AI-written summary · about
chapters (10)
- 0:00GHC plugin for breakpoints
- 1:06GHCi debugger problems
- 4:00Advantages of plugin approach
- 8:23Plugin API and breakpoint variants
- 9:04Renamer plugin details
- 12:19Type checker for value display
- 16:48Unpausable values and timeouts
- 20:46Breakpoint pitfalls and limits
- 21:51Future plugin ideas
- 22:36Q&A








