java - Can I get a 'better' verbose output in Netbeans 7.3? -


i'm trying find output mode show me execution , order of every method called in running program. verbose , debugger output detail don't seem give me that. there way detailed output 1 i've described here? thanks!

you can using following ways:

one: put either of these codes in every method in program:

system.out.println(thread.currentthread().getstacktrace()[1].getmethodname()); system.out.println(new object(){}.getclass().getenclosingmethod().getname());  

two: use dumpstack() method:

thread.currentthread().dumpstack(); 

three: use printstacktrace of throwable

new throwable().printstacktrace(); 

four: variation of first solution

stacktraceelement[] stacktrace = thread.currentthread().getstacktrace(); for(stacktraceelement st : stacktrace){     system.err.println(st); } 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -