This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "debugging simple java files." Watch "debugging simple java files." New topic

debugging simple java files.

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 557

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:-
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,, & 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: 859

It sounds like you are not just debugging your simple Class, but java itself!

Why would you want to do that?

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 557

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.
Consider Paul's rocket mass heater.
subject: debugging simple java files.
It's not a secret anymore!