Intellij Debugging Shows Wrong Data Types

Answered

I am trying to debug some Junit test code in the debugger. It looks like the some of the variables are giving me the wrong data types. As you can see in the screen shot, the saveGold boolean variable is showing as a boolean array and the goldName String is showing as an integer.

I am using Intellij 2020.2.4 Community

Also if I try

goldName.getClass()

in the evaluation window, i get Error Evaluating method : 'getClass'

 

0
2 comments

Hi, it seems that the class does not contain the debug information (see the message node "Variables debug info not available"). In this case debugger still tries to show variables, but types and names correcteness are not guaranteed.

0
Avatar
Permanently deleted user

Yes. Thanks for that. I was looking to the IntelliJ Java Compiler settings to generate the debug info. Something else in our gradle build was not setting the -g option properly to generate the debug information.

0

Please sign in to leave a comment.