Having trouble accessing objects in Scala debugger
This is within the context of debugging a Lift application using:
- IDEA 9.0.3
- Scala Plugin 0.3.1814
My breakpoints work OK. However, I can't seem to evaluate any expression that is not a local variable. For example, in one of my snippet methods I want to evaluate net.liftweb.http.S.param("foo"):
I can see that it actually found the object method since it's showing the return type of net.liftweb.common.Box and because it's resolving the object to the Java class name net.liftweb.http.S$. Is there something I can do differently to allow this kind of expression to be evaluated in the debugger?
thanks
collin
Please sign in to leave a comment.
the scala compiler produces some really weird stuff. for example, some method names are p$p1$p2§p3$p4$actualMethodName, p being the packages. same for the attributes. some are simply named as you would expect them to be, some are p$p$p$p$attributename. you can find out by calling getClass().getDeclaredMethods/getDeclaredFields via debugger.
the debugger window will show the $-names as errors, but you can evaluate them. the plugin doesn't enhance the debugger yet, so it assumed everything to be plain java.
Thanks for the reply and the information!
you're welcome. that'll be 50$