Helpful Stack Trace for Java DebuggingFor quick, free, and easy stack inspection for your running Java program, put this code at the point you want to inspect the stack:
new Exception("Your message here").printStackTrace();When this code is reached, the stack trace will be printed to standard output, along with your message. If you have a lot of output simply save it in a file and search for your string.
If you have a method which is called from several different locations and you need to know which caller is responsible, this can help.
Also, read this article about an online stack trace dump tool that works on any internet-connected computer.
Copyright © 2020 Andrew Oliver