MemberJunction / MemberJunction/MJ
feat(workflows): persist breakpoints across runs of the same workflow
- Dominant language
- TSQL
- Stars
- 29
- Forks
- 6
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 308
Description
**Is your feature request related to a problem? Please describe.**
The workflow debugger's breakpoints live only on this run, in `$.debug.breakpoints` on the parent `MJ: Tasks` row. If you always want to stop on the same step of a Flow agent (the last step of a loop, a fork that keeps going the wrong way), you have to re-arm the breakpoint every time you click Debug.
**Describe the solution you'd like**
Design-time, per-workflow breakpoint persistence: "always break on this step of this workflow." Authoring a breakpoint on the Flow agent's step (or a saved set keyed by workflow + step identity) so the next Debug/Submit starts with those ids already in `$.debug.breakpoints`.
Scope notes from the debugger work in #3793:
- Runtime breakpoints stay a claim-gate (`$.debug` on the parent task). Persistence is about *seeding* that set at Submit, not a second pause mechanism.
- Step identity should be stable across compiles (agent step id / tempId), not the per-run `MJ: Tasks` row id.
- Not cross-user unless we decide otherwise; start as per-user or per-definition, not a live channel to a worker.
**Describe alternatives you've considered**
- Keep re-arming by hand (today). Fine for one-off debugging; bad for a step you always inspect.
- Persist the last run's `$.debug` bag onto the Flow agent. Cheap, but it would also restore edge overrides and pause state, which are run-specific.
**Additional context**
Called out as deferred in the [Workflow Debugger Guide](https://github.com/MemberJunction/MJ/blob/next/guides/WORKFLOW_DEBUGGER_GUIDE.md) ("What this is not" — not cross-run breakpoint persistence). Split out of #3793 so the drop-in wrap / live-run paint can stay closed.
Related: #3793, `packages/TaskGraph/src/debug-state.ts`, ``.
Contributor guide
Research direction
Start with packages/TaskGraph/src/debug-state.ts and the entry point, then read the deferred section of guides/WORKFLOW_DEBUGGER_GUIDE.md and related issue #3793. Define how design-time workflow and stable step identities seed $.debug.breakpoints at Submit, while leaving run-specific state unpersisted; document the per-user or per-definition choice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100