Fixed
-
The debugger tool set was unusable (#101). Three HTTP-contract defects,
all reproduced and then verified fixed end to end on a live system:- Missing stateful session. ADT's debugger is a stateful protocol:
attach
opens a debug session bound to the ABAP session, and every later call must
run inside it. Nothing sentX-sap-adt-sessiontype: stateful, soattach
answered 200 and looked fine whilestack/variables/stepall failed
with 404noSessionAttached. The header is now onattachand every call
after it. - Wrong
Accepton the listener./debugger/listenersserves exactly one
media type (application/vnd.sap.as+xml). The failure mode was silent: with
anything else the long poll just sat there and the tool reported
caught: false— indistinguishable from "nothing hit the breakpoint".
A backend rejection (406) is now reported as the error it is. - A successful
continuewas reported as a 500.stepContinueon a
debuggee that nothing else traps lets the ABAP session finish before ADT can
answer, so the step comes back as 500SY/530debuggeeEndedwhile the
triggering request returns 200. That is the operation succeeding; it now
answersstatus: "debuggeeEnded"with an explanation instead of an error.
Also: a failed
attachno longer records a session that doesn't exist (and
says so when the debuggee had already resumed),noSessionAttachedanswers
with the recovery step, andadt_debug_stopnow resumes the attached debuggee
(release, default true) before cleaning up, so no suspended request is left
hanging. The tool descriptions and README now state what an external
breakpoint actually traps (HTTP/ICF, RFC, background — not your own SAP GUI
dialog session), theclassrun+SUBMITworkaround for dialog-only code,
and that the listener must be armed before the run is triggered. - Missing stateful session. ADT's debugger is a stateful protocol:
-
adt_create_object500 on a function module in a namespaced group (#100).
The POST target percent-encoded the group name, but thecontainerRefinside
the body did not —/FGLR/DEVCbecame…/functions/groups//fglr/devc, an
extra path segment pointing at a resource that doesn't exist, so the backend
answered 500. Both places now encode the group as one path segment. -
adt_create_object type=functiongroupnever worked. Found while verifying
the above: a stock S/4 (SAP_BASIS 755) rejects the declared v3 media type with
400ExceptionInvalidData("Data is invalid and could not be converted") and
accepts the identical body as v2. The media-type fallback only retried on 415,
so the create always failed. It now also walks down the version chain on a
400ExceptionInvalidData. Verified end to end on a live system: function
group + function module created in$TMPand deleted again.
Changed
adt_where_usedno longer floods the context. A central object can carry
five figures of references (CL_GUI_FRONTEND_SERVICES: 11117 parsed entries,
~126 KB in one tool result). The list is now capped atmaxResults
(default 200) and the response carriesnumberOfResults— the backend's own
count fromusageReferenceResult— plustruncated/totalParsedwhen the
list was cut.
Install: npx sap-adt-mcp — npm: https://www.npmjs.com/package/sap-adt-mcp