marcellourbani / vscode_abap_remote_fs

Remote filesystem for ABAP systems
MIT License
174 stars 28 forks source link

catch SAPGui debugging session #156

Closed uxkjaer closed 2 years ago

uxkjaer commented 3 years ago

Hi. It looks like a post request is send like: /sap/bc/adt/debugger?method=attach&debuggeeId=0242AC1100061EEBAA923610178090A9&dynproDebugging=true&debuggingMode=user&requestUser=KJAERJ with a blank body. This occured when I executed the program via Eclipse.

I got the response

<?xml version="1.0" encoding="UTF-8"?><dbg:attach xmlns:dbg="http://www.sap.com/adt/debugger" isRfc="false" isSameSystem="true" serverName="vhcala4hci_A4H_00" debugSessionId="0242AC1100061EEBAA9236127656D0A9" processId="3147" isPostMortem="false" isUserAuthorizedForChanges="true" debuggeeSessionId="0E000000C11600  vhcala4hci_A4H_00" abapTraceState="" canAdvancedTableFeatures="true" isNonExclusive="false" isNonExclusiveToggled="false" guiEditorGuid="7A2F974A-F1BA-41C7-878B-F350D903771F" sessionTitle="vhcala4hci_A4H_00" isSteppingPossible="true" isTerminationPossible="true">
  <dbg:reachedBreakpoints>
    <dbg:breakpoint id="KIND=0.SOURCETYPE=ABAP.MAIN_PROGRAM=ZSFLIGHT_UNIT_TEST.INCLUDE=ZSFLIGHT_UNIT_TEST.LINE_NR=61" kind="line" unresolvableCondition="" unresolvableConditionErrorOffset=""/>
  </dbg:reachedBreakpoints>
  <dbg:actions>
    <dbg:action name="updateDebugging" style="check" group="setting" title="Update Debugging (Off)" link="/sap/bc/adt/debugger/actions?action=updateDebugging&amp;value=true" value="false" disabled="false"/>
    <dbg:action name="garbageCollector" style="push" group="execute" title="Garbage Collector" link="/sap/bc/adt/debugger/actions?action=garbageCollector" value="" disabled="false"/>
    <dbg:action name="commitWork" style="push" group="execute" title="DB Commit" link="/sap/bc/adt/debugger/actions?action=commitWork" value="" disabled="false"/>
    <dbg:action name="rollbackWork" style="push" group="execute" title="DB Rollback" link="/sap/bc/adt/debugger/actions?action=rollbackWork" value="" disabled="false"/>
  </dbg:actions>
</dbg:attach>

Following that was a post call: /sap/bc/adt/debugger?method=setDebuggerSettings With payload

<?xml version="1.0" encoding="UTF-8"?>
<dbg:settings showDataAging="false" sharedObjectDebugging="false" backgroundRFC="false" createExceptionObject="false" systemDebugging="false" xmlns:dbg="http://www.sap.com/adt/debugger"/>

Finally a GET call to /sap/bc/adt/debugger/stack?emode=_&semanticURIs=true

with response

<?xml version="1.0" encoding="UTF-8"?><dbg:stack xmlns:dbg="http://www.sap.com/adt/debugger" isRfc="false" debugCursorStackIndex="0" isSameSystem="true" serverName="vhcala4hci_A4H_00">
  <stackEntry xmlns:adtcore="http://www.sap.com/adt/core" stackPosition="3" stackType="ABAP" stackUri="/sap/bc/adt/debugger/stack/type/ABAP/position/3" programName="ZSFLIGHT_UNIT_TEST" includeName="ZSFLIGHT_UNIT_TEST" line="61" eventType="FORM" eventName="%_SEL_SCREEN" sourceType="ABAP" systemProgram="false" isVit="false" adtcore:uri="/sap/bc/adt/programs/programs/zsflight_unit_test/source/main#start=61,0"/>
  <stackEntry xmlns:adtcore="http://www.sap.com/adt/core" stackPosition="2" stackType="ABAP" stackUri="/sap/bc/adt/debugger/stack/type/ABAP/position/2" programName="ZSFLIGHT_UNIT_TEST" includeName="ZSFLIGHT_UNIT_TEST" line="371" eventType="MODULE (PAI)" eventName="%_END_OF_SCREEN" sourceType="ABAP" systemProgram="true" isVit="false" adtcore:uri="/sap/bc/adt/programs/programs/zsflight_unit_test/source/main#start=371"/>
  <stackEntry xmlns:adtcore="http://www.sap.com/adt/core" stackPosition="3" stackType="DYNP" stackUri="/sap/bc/adt/debugger/stack/type/DYNP/position/3" programName="ZSFLIGHT_UNIT_TEST" includeName="1000" line="41" eventType="PAI SCREEN" eventName="1000" sourceType="DYNP" systemProgram="false" isVit="true" canVitOpen="true" canVitBreakpoints="true" canVitBreakpointCondition="false" canVitJumpToLine="false" canVitRunToLine="true" adtcore:uri="/sap/bc/adt/vit/wb/object_type/progps/object_name/ZSFLIGHT_UNIT_TEST%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201000#start=41" adtcore:type="PROG/PS" adtcore:name="ZSFLIGHT_UNIT_TEST                      1000"/>
  <stackEntry xmlns:adtcore="http://www.sap.com/adt/core" stackPosition="1" stackType="ABAP" stackUri="/sap/bc/adt/debugger/stack/type/ABAP/position/1" programName="ZSFLIGHT_UNIT_TEST" includeName="&lt;SYSINI&gt;" line="18" eventType="EVENT" eventName="SYSTEM-EXIT" sourceType="ABAP" systemProgram="true" isVit="false" adtcore:uri="/sap/bc/adt/programs/includes/%3csysini%3e/source/main?context=%2fsap%2fbc%2fadt%2fprograms%2fprograms%2fzsflight_unit_test#start=18"/>
  <stackEntry xmlns:adtcore="http://www.sap.com/adt/core" stackPosition="1" stackType="DYNP" stackUri="/sap/bc/adt/debugger/stack/type/DYNP/position/1" programName="SAPMSSY0" includeName="1000" line="3" eventType="PBO SCREEN" eventName="1000" sourceType="DYNP" systemProgram="true" isVit="true" canVitOpen="true" canVitBreakpoints="true" canVitBreakpointCondition="false" canVitJumpToLine="false" canVitRunToLine="true" adtcore:uri="/sap/bc/adt/vit/wb/object_type/progps/object_name/SAPMSSY0%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201000#start=3" adtcore:type="PROG/PS" adtcore:name="SAPMSSY0                                1000"/>
</dbg:stack>
marcellourbani commented 3 years ago

@uxkjaer I do the same thing, except maybe the settings ... Except with a bunch of bugs I will probably tackle this weekend.

What's your point?

uxkjaer commented 3 years ago

nothing just trying to help as you mentioned you haven't got it working yet.

marcellourbani commented 3 years ago

I'm doing the right calls, but something is missing. Maybe a parameter when you launch the SAPGUI, I don't know

marcellourbani commented 3 years ago

Did some marginal progress:

marcellourbani commented 3 years ago

@uxkjaer I think this was actually sorted about 10 days ago, except a bug on activating existing breakpoints on first debugger activation. Can you confirm?