Date: 2025-12-22 Report ID: 001 Subject: WebSocket-based AMDP Step-by-Step Debugging
Implemented and tested a combined executeAndDebug action for same-session AMDP debugging via WebSocket. While the infrastructure works, AMDP breakpoints do not trigger execution stops.
- Added
executeAndDebugaction that:- Starts AMDP debug session (or reuses existing)
- Sets breakpoint at specified line
- Executes AMDP method
- Calls
resume()to get debug events - Returns combined result
- Added
ExecuteAndDebug()method - Added
AMDPExecuteDebugResulttype
- AMDP debug session starts successfully (CL_AMDP_DBG_MAIN->start)
- Control interface obtained (CL_AMDP_DBG_CONTROL->create)
- Breakpoints "set" without error (sync_breakpoints)
- AMDP execution works (method runs and returns data)
- Resume blocks correctly (waiting for events)
- Breakpoints don't stop execution - The critical issue
- AMDP method runs to completion
- resume() then blocks forever (no pending ON_BREAK event)
- executeAndDebug times out
The IF_AMDP_DBG_CONTROL->sync_breakpoints API is being called correctly, but breakpoints aren't triggering. Possible causes:
-
Breakpoint position format:
- We use
abap_position-program_name = 'ZCL_ADT_00_AMDP_TEST' - May need different format for AMDP (schema.procedure?)
- We use
-
HANA debugger not connected:
- AMDP debugging bridges ABAP and HANA debuggers
- May need additional HANA-side configuration
-
Session isolation:
- AMDP debugging may require specific HANA session configuration
- The generated procedure may run in different context
-
Line number mapping:
- ABAP source line 40 vs SQLScript procedure line numbers
- May need native_position instead of abap_position
- ABAP Service:
/home/alice/dev/vibing-steampunk/embedded/abap/zcl_vsp_amdp_service.clas.abap - Go Client:
/home/alice/dev/vibing-steampunk/pkg/adt/amdp_websocket.go:563-618 - Test Class:
ZCL_ADT_00_AMDP_TEST(line 40 =lv_square = :lv_i * :lv_i)
/tmp/test_execute_and_debug.go- Tests combined executeAndDebug/tmp/test_amdp_step_by_step.go- Step-by-step analysis
- Investigate breakpoint format: Research IF_AMDP_DBG_MAIN=>ty_dbg_breakpoint_req structure
- Check HANA debugger logs: May provide insight on why breakpoints don't fire
- Eclipse ADT comparison: Capture Eclipse AMDP debug traffic to see correct API usage
- Try native_position: Use SQLScript position instead of ABAP position
The fundamental challenge with WebSocket AMDP debugging:
resume()blocks the session waiting for eventsexecute()must happen in the same session for breakpoints to work- Our
executeAndDebugsolves this by combining both in one request
However, this only works if breakpoints actually trigger. Without working breakpoints, the method runs to completion and resume() blocks forever.
AMDP Debugging: Experimental - Infrastructure in place, breakpoint triggering needs investigation.