Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log of debug stack in helios

 
Mandar Khire
Ranch Hand
Posts: 569
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Eclipse helios, i try to keep log of debug when i put break points on each functions,classes etc.
I use notepad & use copy paste method to see how & where & when changes occur when i go to each step. But it very lengthy process...debugging remains i busy in collecting logs.
Is their plug in or very easy method to do this?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
log4j?
 
Mandar Khire
Ranch Hand
Posts: 569
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter Johnson for suggesting log4j...
But as i readshort intro.
& as per this.
User(here i) have to read & study for how to collect log...
Now example:-
I write simple code:-

In this example i declare 2 variables, 1 boolean, 1 int.
In eclipse helios IDE i can use breakpoints, i put breakpoints on line 4,5,6,7,11,18,21,23,,29 & try to debug i can get stack like this

& if i see (x)= variables

Now if i click F5 then again something change in Debug view & same with variables also...For auto capturing all this in txt or something like that...
log4j is only one option or just copy-paste in 2 different files is only way?
I am doing this(collecting stack & study it), is really helpful for understand how something happened in VM due to some line of code?
I also download Bytecode Visualizer from Marketplace of eclipse IDE. By that if i open any class, it will show detail code which in that class..but not understand it properly...which language is that?
eg:- i open Recatangle.class
i got few lines like

How to understand it?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry, but I have no idea what it is that you are attempting to do. It sounds like you are trying to capture the flow of your application, but I'm not sure why. (Back when I first started programming we didn't have IDEs nor debuggers, so we manually executed our source code on paper while keeping track of variable values. That should work for a simple program like the one you have.) Besides, the System.out.printlns should show you the flow.

Regarding Bytecode Visualizer, Java bytecode is what you Java source code get compiled into. The javap tool that comes with the JDK can also print out the bytecode. Unless you are used to looking at assembly code or other machine code, it is not going ot help you all that much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic