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: 

Is there a bug in ABAP debugger?

former_member311383
Discoverer

Hi,

I recently noticed a weird behaviour while debugging some custom ABAP coding.

First we thought of some buffer problem with newly generated code. You might have seen the debugger showing you new code while some old code is executed. There might be some odd behaviour then. But when you restart the program everything is fine again.

Now we managed to break down the issue to these few lines:

The debugger stops at line 13. Apparently it shouldn't.
Coding in this line is not executed, so it seems to be a debugger-only problem.

Can anyone explain this? Is this a known issue?

I ran this on SAP Netweaver 7.4.

Thanks & Regards,

Jonathan

For copy/paste:

DATA(lt_laiso) = VALUE laiso_tab( ( 'FR' ) ).

IF 1 EQ 2.
lt_laiso = COND #( WHEN 1 EQ 1 THEN VALUE #( ( 'DE' ) ) ELSE lt_laiso ).
ENDIF.

WRITE: / lt_laiso[ 1 ].

5 REPLIES 5

matt
Active Contributor

If you set a breakpoint, it doesn't stop. If you execute->debugging, then it does stop at that line. However, in all cases, the output is "FR". So it looks like the line isn't, in fact, being executed.

Most odd

Paging horst.keller

horst_keller
Product and Topic Expert
Product and Topic Expert

Found the same (strange) behavior and forwarded to debugger colleagues. -> It is a "Debugga Morgana"

pokrakam
Active Contributor
0 Kudos

This intrigued me so I gave it a quick test.

On 7.5 SP6 it behaves as expected and hits the breakpoint in ADT and SAPGUI.

BUT... then it steps into the IF branch. The value isn't changed so, as Matthew observed, it isn't executed. Morgana indeed.

sathyags
Active Participant

It seems to me that it is something to do with the ELSE statement :). If you move the ELSE statement to the next line, the control jumps to that line and if you remove it, it doesn't get in the IF block at all. Odd anyways!

iftah_peretz
Active Contributor
0 Kudos

Hey,

I saw this and got curious. In 7.4 SP 13 and up it is working as expected (breaks at line 10, in you example).