5

The IntelliJ idea does not show the line that throws an exception

 3 years ago
source link: https://www.codesd.com/item/the-intellij-idea-does-not-show-the-line-that-throws-an-exception.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The IntelliJ idea does not show the line that throws an exception

advertisements
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?


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.

Related Articles

IntelliJ IDEA does not show my module / project

Suddenly, IntelliJ IDEA is showing the following module view with a strange yellow colour in the background. I don't know how to get my module back, because it is not being shown: Do you know how can I see my project folder back? ThanksYou can go to

Why does not the caller of the method that throws an exception handle the exception in this situation?

Consider the following interface: package hf; public interface BadInterface { void meth() throws Exception; } Which is implemented by the following class: package hf; public class apples implements BadInterface { public static void main(String[] args

IntelliJ IDEA does not display the scala file option in the read project

I have created play project using typesafe activator 1.2.12 and converted into IntelliJ IDEA using idea command. Then I have imported into IntelliJ IDEA. I have edited routes file. Then I tried to create scala file in controllers directory by right c

IntelliJ IDEA does not copy the application server descriptor and static Web files to its temporary folder on debugging

Do you guys know why IntelliJ IDEA doesn't copy app server descriptor files to temporary folder on debug ? I have gae+gwt project. I created gwt debug configuration that uses dev google app server as server. When I launch debug session it fails with

Intellij IDEA does not import @Grab dependencies in the Groovy project

I have a groovy script I am working on, which imports dependencies using the @Grab annotation. This script will run within IDEA, and from the command line. However, within the IDE, the imports are shown in red (as unresolvable), and no auto-completio

IntelliJ Idea does not generate an identifier in R.java

I recently switched to IntelliJ Idea 12. Now created a project on android and immediately ran into a problem: not generated id in R.java Rebuild project does not help. Maybe in IntelliJ Idea have any subtlety is not known to me? error: 12-01 16:08:15

IntelliJ IDEA does not allow me to run ScalaTests from a SBT project more

I have a strange problem in IntelliJ IDEA: I have an SBT project which has ScalaTests. I organized my settings in blocks like this: lazy val common = Seq( organization := "com.example.foo", version := "0.0.1-SNAPSHOT", scalaVersion :=

Intellij IDEA does not recognize Play 2.0 features

I checked out project from Github, then run sbt gen-idea and opened this project in IDEA. One of the project modules uses Play 2.0 Framework. But IDEA don't recognize symbols specific to Play!. I.e. I get following error: cannot resolve symbol index

Xcode 4 Instruments does not show source lines

I've just started playing with Xcode 4, and found that, no matter how I setup debugging symbols in the project, Instruments refuses to display source lines for stack trace items that correspond to my code. In only shows hex offsets and identifies my

IntelliJ IDEA does not highlight code that throws an exception - how to enable it?

I have a method: private void test() throws NullPointerException { System.out.println("blabla"); throw new NullPointerException(); } which throws NullPointerException but when I'm trying to invoke this method: test(); IntelliJ IDEA doesn't warn

IntelliJ IDEA does not recognize .feature files

I have installed the cucumber-java and gherkin plugins in IntelliJ IDEA but when I create a .feature file it is not recognized as a feature file. I did restart IntelliJ and have checked to make sure the plugins are enabled in the plugins settings win

Intellij Idea does not compile my project after switching from JDK 1.6 to 1.7

I created an Intellij project under JDK 1.6. Then I installed JDK 1.7 and removed JDK 1.6. When I opened the project, I changed JDK to 1.7 in the Project structure dialog. But my files are not recompiled - if I add errors into my code and select Buil

IntelliJ IDEA does not load - stuck on startup screen

I've set up my JDK_HOME, JAVA_HOME, and PATH variables to their appropriate values. I've also installed both a 64 and 32 bit JDK and JRE. When I try to load the Intelij IDEA, it freezes and doesn't show the progress bar (see screenshot). It loads aft

WPF DataGrid Does Not Show All Lines

I have an ObservableCollection bound to a WPF DataGrid. The ObservableCollection is populated and updated asynchronously. The DataGrid is not displaying the correct number of rows. Each time I run the application I get a varying number rows displayed

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK