Is there a way to make the Intellij debugger show me where an exception was thrown in my own code? For example, I am currently trying to use the function parseInt of the Integer class to convert a string into an int.
public static int inputAccountNumber(){
Scanner scan = new Scanner(System.in);
System.out.print("Insert account number: ");
return Integer.parseInt(scan.nextLine());
}
In this case, If I just press enter when the input comes up, then an exception is thrown in the Integer class itself (and the debugger stops to show me the exception). However, I don't really care where in the Integer class this exception was thrown, I only want to the debugger to tell me where in my own code this problem occured.
I tried looking in the settings for breakpoints (which is where I enabled the option for the debugger to stop at exceptions), but it doesn't look like it has an option that fixes my problem.
P.S.: I'm on Intellij IDEA 2022.3.1 (Community Edition).