Can Intellij Idea be configured to break when a JUnit AssertionError occurs?

intellij-idea, java, junit

Solution

From the Breakpoints dialog, click the `+` button to add a new breakpoint, select "Java Exception Breakpoints" from the drop-down, and then enter `java.lang.AssertionError` as the exception class.

Problem

Can Intellij Idea be configured to break when a JUnit java.lang.AssertionError occurs during debugging? I know that Intellij Idea supports the ability to break when exceptions occur during debugging, but I am not sure if this is possible for AssertionErrors. This would be particularly useful when a large application context must be prepared before unit tests can be ran. I searched, but could not find the answer to this question. Here is how my Run > View Breakpoints... > Java Exception Breakpoints dialog is configured:

Original source