Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将所有方法调用的列表打印到标准输出,其中包含有关调用哪个方法以及调用它的方法的信息。我正在尝试使用 Eclipse API 来执行此操作,有谁知道任何可以为我提供此信息的函数?
无论您需要在何处打印此信息,都可以尝试以下操作:
Exception ex = new Exception(""); ex.printStacktrace();
关键是,不要抛出异常,只需打印堆栈跟踪:-)