title: Is it possible to set a breakpoint on assert in eclipse?
body: <p>I have a large project consisting of several thousand classes. Today I discovered that for some input, a different result is calculated when running with assertions enabled.</p>
  
  <p>Since the assertion itself doesn't throw an AssertionError (I already have a breakpoint on that one), this means that somewhere hidden in the code is an assertion statement that has an unwanted side effect. The problem is I have no clue which of my >100 assertions is causing the problem.</p>
  
  <p>Since assert is not a method but a keywordin Java, I am at a loss on how to set a breakpoint that will be hit each time assert is called.</p>
  
  <p>Possible workarounds I have found:</p>
  
  <ul>
  <li>commenting out assertions one by one and running the program to finally find the culprit.</li>
  <li>run my test case with a code coverage tool like <a href="http://www.eclemma.org/" rel="nofollow">eclEmma</a> to filter out some of the assertion statements.</li>
  <li>enabling assertions only for certain packages to narrow down the number of assertions that might be the cause.</li>
  <li>doing a search and replace (using regular expressions) to replace assert by a utility method where I can place a breakpoint.</li>
  </ul>
  
  <p>Nonetheless, I would like to know if anyone knows of a way to break on assert, even if the condition evaluates to true.</p>