This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Debug Help

 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, In the debug mode, I am not able to see class level variables(s) under Debug variables section. Any reason for that ?

Please see this screenshot
debug.png
[Thumbnail for debug.png]
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Harikrishna,

in the variables view in Eclipse you can click on the "menu icon" (this is the arrow downwards) and there you choose "Java -> Show Static Variables". This will do the trick

Marco
 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marco. This will show only static variables..Do you know how we can see instance variables as well.
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.) The "instanceVariable" in your screenshot is NOT an instance variable. It's called a local variable because you declared it inside a method. So the name is misleading. Local variables are visible by default in the variables view.

2.) Real instance variables would be visible in the debugger by default when you would open the "this" field in the debug view. But because you are only using the static main() method there is no instance of a class involved and therefore there is no "this" and no instance variables. You will need something more "complex" in order to see more information in the variables view

Marco
 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent..Thanks Marco
 
Ankit Garg
Sheriff
Posts: 9529
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with SCJP, moving to IDEs forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic