contour
contour copied to clipboard
Evaluate the use implementing a Contour DAP server
After having a short conversation with @cqexbesd, I think it might be a really nice addition to implement DAP (Debugger Adapter Protocol)
What's currently possible, is to put a Contour instance into trace mode, and then step through each and every little VT sequence and character printing event.
For that you can configure Contour like so:
- { mods: [Control, Meta], key: 'E', mode: "~Trace",action: TraceEnter }
- { mods: [Control, Meta], key: 'E', mode: "Trace", action: TraceLeave }
- { mods: [Control, Meta], key: 'N', mode: "Trace", action: TraceStep }
- { mods: [Control, Meta], key: 'F', mode: "Trace", action: TraceBreakAtEmptyQueue }
While that works, what is missing is the introspection of the terminal instance's internal state, or other features like:
- what ANSI / DEC modes are enabled?
- possible introspection to some of its caches (GUI frontend related)
- break at certain event like mode changes or at a specific VT sequence
- better visualize screen updates
- what's the current cursor position (as it's not always visible)
- current horizontal and/or vertical margin
But since this kind of debugging has no source to debug but rather an active stream of events between the client terminal app and the terminal instance (Contour GUI), it is unclear to me if DAP can still be implemented and is actually useful for such situations.