I am thinking of creating a debug tool for my Java application.
I am wondering if it is possible to get a stack trace, just like Exception.printStackTrace()
but without actually throwing an exception?
My goal is to, in any given method, dump a stack to see who the method caller is.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…