• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

debugging simple java files.

 
Ranch Hand
Posts: 630
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 630
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic