When using Intellij's debugger, the variables in scope are displayed using a 4 digit identifier, marked in red in the following screenshot.
This identifier seems to be calculated based on the object's identity.
What exact code is used to get the 4 digit number for a given object instance?
I don't think you should rely on that id being calculated in any special way. It's internal to IDEA (or JVM) and I don't think it holds any relevance except to track objects during execution.
However, I find it useful to name objects during debug. I believe the shortcut is F11 (click once on the object in debug window first) and just give it a name that is meaningful for you during debugging. That object will always hold that name during the current session of debugging.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With