How do I evaluate objects when debugging a JSP?

I am a relatively experienced Java programmer and IntellJ user and I am trying something new - I need to debug a web app on Tomcat.   However, there doesn't seem to be a clear-cut guide to how to do this in Intellj (at least I can't find it.)

I've got the project running in debug mode, set a breakpoint inside my JSP and when I hit that page my app stops at the breakpoint.

My question:   How do I evaluate the values that the JSP is using?   I am breaking on a line like:

    <c:if test="${myObject.myThing == SomeClass.ENUMVALUE.myvalue}"  >

and anything I try to "watch" or "evaluate" gives me an error message.   I get either

${myObject.myThing == SomeClass.ENUMVALUE.myvalue}:  Invalid Expression

myObject.myThing:  Type is unknown for 'myObject'

(MyCorrectType) myObject:  Cannot find local variable 'myObject'

How can I evaluate these expressions and find out what's in them?   Is that even possible?


Please sign in to leave a comment.