Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Cannot view field names in Eclipse debug mode.

 
Ranch Hand
Posts: 37
Oracle Tomcat Server Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Having issues trying to debug some objects in Eclipse.

In the variables window, I can see my objects with their fields listed beneath them, and I can inspect the values. But the field names are just showing up as single letters, like "b", then "c", then "d" which makes interpreting my errors a lot harder than it would be if those fields had normal names in English.

Why is this happening? Is it a problem with eclipse, or a problem with my configuration? Or does it mean the people who wrote the code for these objects were sadists and the fields are actually just named "b" etc.? Autotranslated code, perhaps?
 
Marshal
Posts: 74693
335
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Some of those "sadists" might be reading here ( ) but I'm not one of them! I tried debugging a simple application on Eclipse Europa on Linux just now and the fields appeared with the same names I had given them; it might be a configuration thing.

The details are supposed to be in Eclipse Help->help contents->left pane->Java development user guide->tasks->running and debugging->local debugging->inspecting values->whichever of the 3 views you are using, in your case variables view.
When I looked, even the expanded views had recognisable names for sub-fields.

Sorry I can't help you any more; it didn't say anything about configurations in that help page. You can probably find configurations via help.
 
Saloon Keeper
Posts: 24847
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem occurs when you step into classes for which you have no source code. I think additionally they have to have been compiled without debugging information. So the debugger synthesizes the non-public names - it has no way of recovering the information. Not sadism, just making the best of a bad deal.

I'll leave the real Eclipse sadism for another day...
 
Eli Wood
Ranch Hand
Posts: 37
Oracle Tomcat Server Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Heh, I meant to imply sadism on the part of those who compiled and wrote the libraries I'm using. I know Eclipse has a strong community of not-for-profit developers and the project has come a long way to become either the best or nearly the best Java IDE out there.

Also, thanks to both of you for your thoughtful replies.

This definitely isn't an overarching problem... I can view field the field names for code I wrote myself and for objects in the Spring framework.

Tim, I believe you're right. On looking at the .jar where I'm pulling my classes from I can view the names of public methods, but not the private fields. So you guys have pretty much convinced me there's nothing wrong (at least in this respect) with my Eclipse configuration.

But can you imagine the frustration of using unfamiliar parts of an API and trying to determine what's going wrong while your debugger only reveals the object has fields b - g? Yeah.

Again, thanks!
 
Campbell Ritchie
Marshal
Posts: 74693
335
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They're a lot more sadistic than you think . They are assuming all the API code you using is correct and only your own code could have errors in.

And if you believe that you'll believe anything.

But we are please to be able to help
 
reply
    Bookmark Topic Watch Topic
  • New Topic