Skip to Content

ADT debugger doesn't show constant values

Sep 12, 2017 at 12:25 PM


avatar image

When debugging, the ADT debugger won't show class constants, SE80 does.

NetWeaver 750 SP6 / ADT 2.80.3 on Oxygen, example:

REPORT zadt_debug_no_constants.

    CONSTANTS t1 TYPE string VALUE `A`.
    DATA      t2 TYPE string VALUE `B`.


DATA(test) = NEW lcl_test( ).

In the SE80 debugger I see both data elements:

But in Eclipse the constant is missing:

Has anyone else experienced this, is this a bug? Couldn't find any settings in ADT that would hide it.

sapgui-debug.png (14.1 kB)
adt-debug.png (7.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Fabian Lupa Sep 12, 2017 at 01:58 PM

It's a feature!

constants.png (24.5 kB)
Show 5 Share
10 |10000 characters needed characters left characters exceeded


On Oxygen that menu is cleverly hidden behind an unintuitive triangle icon that looks like it's part of the window functions.

Would have been better if it were on by default, like SE80.
And no I'm not saying that because it cost me an hour's frustration because I *thought* my code wasn't working when it was ;-)

image.png (6.1 kB)

For me personally I always disliked the display of constants in the (old new / SE80) debugger. Quite often I am debugging classes which "implement" a constants-interface with dozens of constants, so I need to scroll some pages to get to the variables I want to see. And it's not like their value is going to change at any point in time...

Also since they are constants in most cases the value shouldn't matter much at all, because you always access it using the constant.

But to each their own :) By the way, you also can see them when you hover over the reference variable in the source code in the debugger.


Understand, I guess that's why having it switchable makes sense. But as it was always there in SE80, I wouldn't expect them to disappear by default.

In my case I was casting an interface reference parameter back to it's implementing class, to try to read a constant that can vary by class (don't ask!). All dynamic - actually that's a topic for another question...

At first it didn't work due to an error on my part. But then when I fixed it and it still didn't appear, I set off down a false rabbit hole that was entirely due to this little 'feature'. It's only when I tried it in SE80 that I finally 'got it'. I did search through all the Eclipse config dialogs but found nothing.


Sent notification to product owner Thomas Fiedler.


You can use "at"-replies now: Thomas Fiedler ;-)