How to get the type and value of a debugging variable (XValue)?


I am trying to visualize the variables during the debugging process in IntelliJ. Coming from this post:

I know that I can continuously call computeChildren() to navigate deeper and deeper in the debugging tree. However, I am not yet able to read the information I am interested in from the XValue objects.

I am looking for the type and value of the variable which seems to be hidden inside the myValueDescriptor field. But I do not know how to get it and I cannot cast the variable to JavaValue because I have no dependency on this class.

I have attached screenshots of the things I am trying to get, which can be found when debugging:

What is the cleanest way to get the information I need? Is there some kind of official API or method I am missing?

Comment actions Permalink

You'll need to add dependency on Java plugin (, then you can cast XValue and use

Comment actions Permalink

Thanks a lot. It works perfectly for me!


Please sign in to leave a comment.