File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

debugging simple java files.

 
Mandar Khire
Ranch Hand
Posts: 565
Android Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use eclipse juno & netbeans 7.2 for this:-
I use simple code as below:-

aim:- try to understand whats really happens behind before output seen on screen. I start with simple one...want to go for harder...

scenario:- As i tried in eclipse i can see in lots of variable sets before print statement execute...all variables for class.Some are as follows:-
defaultUncaughtExceptionHandler,EMPTY_STACK_TRACE,MAX_PRIORITY,MIN_PRIORITY,NORM_PRIORITY,SUBCLASS_IMPLEMENTATION_PERMISSION,threadInitNumber,threadSeqNumber,blocker,blockerLock,
contextClassLoader,daemon,eetop,group,inheritableThreadLocals,inheritedAccessControlContext,name,nativeParkEventPointer,parkBlocker,priority,single_step,stackSize,stillborn,target,threadLocals,threadQ,l
threadStatus,tid,uncaughtExceptionHandler...etc many more

From netbeans debugging i got info that (when all lines set breakpoint)
I got

Almost 884 lines debug output.
& 22 java files use like Class.java,System.java,Collections.java... & helloworld.java which is source.
Question is:-
1. For simple class which use is also simple...really needs so much variables setting which shown in eclipse debugging activity in variables.
2. For more deep debugging should i put more breakpoints in java's .java files all lines? Some files contain more than 2000 lines. What is a best practice for put breakpoints?
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you are not just debugging your simple Class, but java itself!

Why would you want to do that?

WP
 
Mandar Khire
Ranch Hand
Posts: 565
Android Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks William P O'Sullivan,

...but java itself!
Why would you want to do that?

because curiosity, interest...
i am not trying to solve java's bug...but want to see how particular code behave when we called it by directly or indirectly.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic