Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse debugging help

 
Dhaval J. Patel
Ranch Hand
Posts: 90
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,
I am currently trying to understand a web application code (that does not have any documentation unfortunately). I would like to know if i can display session attributes and the values of all the variables inside those objects (So basically the full map) in the variables view of eclipse, so that I can see what's cooking inside those attributes at run time. Is there any way of doing this ?? It would give me a really good view of whats going on in the web application and would also help me debug applications later on during development. If yes, then I could follow the same procedure for viewing other objects on the heap and would give a wonderful view of the web application.

Thanks,
Dhaval.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the debug view you will find an tab full of values. Or, if your want it, when your debug hits a line you can select the variable and press ctrl+shift+i.
 
Dhaval J. Patel
Ranch Hand
Posts: 90
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.
I dont have anything in my debug window except a list of threads. I am a newbie to eclipse. It would be really helpful if you could elaborate a little.

Thanks,
Dhaval
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could reset your view than. Because the default debug view will display to you tons of windows.

After you select the debug view you can reset the perspective in the menu Window > Reset Perspective.

Maybe this will help you.
 
Dhaval J. Patel
Ranch Hand
Posts: 90
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I have a lot of values in the variables view in the debug perspective. but it doesnt have the session attributes Is there a way to add session attributes to that list
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want just to see what is inside you can put the code

HttpSession session = req.getSession();

You do not need to use it, but the session value will apear in the variables window.
 
Dhaval J. Patel
Ranch Hand
Posts: 90
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it .. Thanks for your help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic