Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA won't stop on assertions in debug mode

Why won't IntelliJ IDEA stop in debug mode when an assertion is triggered? I get a java.lang.AssertionError to console, but the running code doesn't pause at it as it is supposed to. Here are my exception breakpoints settings:

http://i.imgur.com/kiMwLfb.png

like image 993
gvlasov Avatar asked Mar 20 '23 01:03

gvlasov


1 Answers

I found out that somehow debugger doesn't stop on assertions when running tests, but it does stop when running other code. The code I was trying to make stop on a failed assertion in debug mode was a test. That seems to be the issue, but I don't understand why would IDE behave that way.

like image 51
gvlasov Avatar answered Apr 01 '23 17:04

gvlasov