Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot set external breakpoint on RFC enabled FM SADT_REST_RFC_ENDPOINT

AlbertoR
Participant
0 Kudos

Hello everybody,

To understand better how the SQL in ADT Eclipse works I wanted to set a breakpoint and debug it.

So I caused it dump with the following code (alert: do not run this on productive systems if you want to avoid dumps):

select * from ekpo
where netpr = 'abc'

It will dump with a runtime error SAPSQL_DATA_LOSS.

Then I figured out that the RFC enabled FM SADT_REST_RFC_ENDPOINT is being called by the ADT in order to create a (temporary) ABAP program with the SQL code and run it.

So I set external breakpoints on it, with the very same user as the one of the dump from st22, but no chance! The breakpoint is not hit.

Does anybody know why and if it is possible to make it work (i.e. to start up a debugger)?

Thanks a lot in advance for your precious help and have a great evening!

Best regards,

1 ACCEPTED SOLUTION

Armin_Beil
Product and Topic Expert
Product and Topic Expert

Hi Alberto,

the complete client-server communication of ADT is routed through SADT_REST_RFC_ENDPOINT so this is a critical spot. If you create a working breakpoint in SADT_REST_RFC_ENDPOINT then you will stop every single ADT request for your user. This can be a lot, e.g. like pretty much any activity in ADT and also ADT background requests like feed reader updates etc.. You would get a lot of debug sessions, also in parallel, where you are not sure which one is which one, so the outcome of that breakpoint could differ from your expectations.

Therefore I suggest that you avoid creating BPs in SADT_REST_RFC_ENDPOINT at all and instead create the breakpoints directly in the more specific classes that you identified via your dump stack. I guess thats cl_adt_dp_freestyle_res.

However these more specific breakpoints will also not work by default, just as in SADT_REST_RFC_ENDPOINT. To make it work you can use external BPs in SAP GUI (as you did) + completely deactivate debugging in ADT:

Right click on your project in ADT -> Properties -> ABAP Development -> Debug -> On the top of the page disable the checkbox "Enable debugger" -> Apply

When you debug the ADT core functionality via this way then please use only 1 ADT project for a given combination of system + client + username at the same time.

Best regards,
Armin

2 REPLIES 2

Armin_Beil
Product and Topic Expert
Product and Topic Expert

Hi Alberto,

the complete client-server communication of ADT is routed through SADT_REST_RFC_ENDPOINT so this is a critical spot. If you create a working breakpoint in SADT_REST_RFC_ENDPOINT then you will stop every single ADT request for your user. This can be a lot, e.g. like pretty much any activity in ADT and also ADT background requests like feed reader updates etc.. You would get a lot of debug sessions, also in parallel, where you are not sure which one is which one, so the outcome of that breakpoint could differ from your expectations.

Therefore I suggest that you avoid creating BPs in SADT_REST_RFC_ENDPOINT at all and instead create the breakpoints directly in the more specific classes that you identified via your dump stack. I guess thats cl_adt_dp_freestyle_res.

However these more specific breakpoints will also not work by default, just as in SADT_REST_RFC_ENDPOINT. To make it work you can use external BPs in SAP GUI (as you did) + completely deactivate debugging in ADT:

Right click on your project in ADT -> Properties -> ABAP Development -> Debug -> On the top of the page disable the checkbox "Enable debugger" -> Apply

When you debug the ADT core functionality via this way then please use only 1 ADT project for a given combination of system + client + username at the same time.

Best regards,
Armin

0 Kudos

Thank you very much for your help Armin!