This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 492

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.
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: 492

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