IntelliJ idea 不显示抛出异常的行
java.lang.NullPointerException
at com.package.name.classname.methodname(+n1)
at blablabla (+n2)
当应用程序抛出异常时,IntelliJ Idea 显示以下行。我怎样才能找到哪一行抛出了这个异常?我以为 n1 是行号,但事实并非如此 - 它是一个空行。那么我怎样才能找到那条线以及 n1 是什么?
java.lang.NullPointerException
at com.package.name.classname.methodname(+n1)
at blablabla (+n2)
When the application throws an exception IntelliJ Idea show the following lines. How can I find which line has thrown this exception? I thought that n1 is the line's number but it's not - it's an empty line. So how can I find that line and what's n1?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
已加载的类与您正在查看的源代码不同。例如不同版本的二进制文件和源代码。
有时同一个类会在类路径下出现多次。
有时,如果文件混合了 cr/lf,调试器可能会显示错误的行(但在 IDEA 中从未见过)。
有时,构建时或运行时检测可能会使调试器感到困惑。
A class which has been loaded is not the same as you are looking the source code. E.g. different versions of binary and sources.
Sometimes the same class appears several times under classpath.
Sometimes a debugger could show wrong line if file has mix of cr/lf (however never seen it with the IDEA).
Sometimes a build-time or run-time instrumentation could confuse a debugger.
应用程序是否在启用调试信息的情况下编译?是不是被混淆了?
Was the application compiled with the debug info enabled? Was it obfuscated?