Java - 是否可以输出带有方法签名的堆栈跟踪?
是否可以输出当前堆栈跟踪带有方法签名?我正在尝试调试一些混淆的代码,这些代码有大量具有相同名称的方法,只是参数和返回类型不同。
有些事情不起作用:
Thread.currentThread().getStackTrace();
new Throwable().getStackTrace();
// etc..
Is it possible to output the current stacktrace with method signatures? I'm trying to debug some obfuscated code that has a ton of methods with the same name that just differ in arguments and return type.
Some things that will not work:
Thread.currentThread().getStackTrace();
new Throwable().getStackTrace();
// etc..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,但您可以在故障排除时使用 AspectJ 进行检测,以获得更完整的信息,而无需添加日志记录。
根据您尝试调试的内容的性质以及您对所涉及的任何数据的了解程度,您可能能够或多或少精确地定位目标。
Nope, but you could instrument with AspectJ while troubleshooting to get more complete info without adding logging.
Depending on the nature of what you're trying to debug and how much you know about any data involved you might be able to target more or less precisely.
不可能。堆栈跟踪不包含该信息。
Not possible. The stacktrace does't contain that info.