Skip to content

docs(proposal): mxcli microflow debugger — breakpoints by name#44

Merged
ako merged 1 commit into
mainfrom
docs/microflow-debugger-proposal
Jul 26, 2026
Merged

docs(proposal): mxcli microflow debugger — breakpoints by name#44
ako merged 1 commit into
mainfrom
docs/microflow-debugger-proposal

Conversation

@ako

@ako ako commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Investigation + design proposal turning the ako/mxcli-sudoku runtime-debugger findings (and its scripts/mfdebug.sh wrapper) into a supported mxcli debug feature.

What the investigation found

The Mendix microflow debugger spans two APIs:

  • M2EE admin (:8090, X-M2EE-Authentication) — toggles only: enable_debugger {password}, disable_debugger, get_debugger_status.
  • App debugger endpoint (<app>/debugger/, X-Debugger-Authentication: base64(pass)) — the protocol: start_session (→ session_token), add_breakpoint {microflow_name, object_id, condition?}, get_paused_microflows, get_object, step_over|into|out, continue|continue_all, remove_breakpoint. params is mandatory even when {}; only X-Debugger-Authentication works (raw/Basic/Bearer → 401 {}).

The blocker for humans: a breakpoint's object_id is an activity's model GUID (little-endian .NET GUID in the .mpr), and nothing in the runtime surfaces it.

Why mxcli is the right home: confirmed against the code — run --local already owns the admin password + app URL (docker.CallM2EE), and sdk/mpr/parser_microflow.go already extracts each activity's $ID. So mxcli can offer breakpoints by name (mxcli debug break Module.Flow --activity ACT_Name) rather than by GUID — which no other tool can.

What the proposal specifies

  • mxcli debug command surface (status/enable/break/breaks/unbreak/paused/inspect/step/continue/disable) with name→GUID resolution and internal session-token handling.
  • A small DebuggerClient for the second plane; admin plane reuses CallM2EE.
  • run --local reuse (flagless common case) + optional run --local --debug.
  • Safety (a breakpoint pauses the browser too; auto-disable on interrupt; status shows paused count).
  • Five implementation slices, tests (httptest stubs + a run --local integration run), open questions (activity naming, GUID form, REPL vs subcommands, default-on), and a DAP-bridge follow-up for vscode-mdl.

Docs-only; no code. Continues the proposal-driven workflow in docs/11-proposals/.

🤖 Generated with Claude Code


Generated by Claude Code

Turns the runtime-debugger investigation from the mxcli-sudoku findings/README
(and its scripts/mfdebug.sh wrapper) into a supported feature proposal.

The Mendix microflow debugger spans two APIs: the M2EE admin plane (:8090,
X-M2EE-Authentication) toggles enable/disable/status, and the app endpoint
(<app>/debugger/, X-Debugger-Authentication) drives start_session / add_breakpoint
/ get_paused_microflows / get_object / step_* / continue. A breakpoint's object_id
is an activity's model GUID, which nothing in the runtime surfaces.

mxcli is uniquely positioned: run --local already owns the admin password + app
URL, and sdk/mpr/parser_microflow.go already extracts each activity's $ID — so it
can offer breakpoints BY NAME (Module.Flow --activity Name) rather than by GUID.
The proposal specifies the `mxcli debug` command surface, a DebuggerClient for the
second plane, the name→GUID resolver, warm-loop integration, safety (a breakpoint
pauses the browser too; auto-disable on interrupt), five slices, tests, open
questions, and a DAP-bridge follow-up.

Docs-only; no code.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
@ako
ako merged commit 0ef2446 into main Jul 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants