File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes debugging simple java files. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "debugging simple java files." Watch "debugging simple java files." New topic
Author

debugging simple java files.

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 485
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?


Millions saw the apple fall, but Newton asked why.
If you understand, say "understand". If you don't understand, say "don't understand". But if you understand and say "don't understand". How do I understand that you understand? Understand!
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

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

Joined: Sep 11, 2007
Posts: 485
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
 
subject: debugging simple java files.
 
Similar Threads
Almost there with debugging Servlet on Tomcat with Eclipse
JSP Debug Problem in WSAD 4.0.3
IntelliJ debug with Tomcat 5
Source not found at debugging in eclipse juno!
Eclipse is not puasing at debug points