# Option to use "real" assert

**URL:** <https://forum.juce.com/t/option-to-use-real-assert/36496>\
**Category:** General JUCE discussion\
**Created:** [December 4, 2019, 1:33pm UTC](https://forum.juce.com/t/option-to-use-real-assert/36496 "2019-12-04T13:33:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abrykt](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@abrykt](https://forum.juce.com/u/abrykt)\
**Post date:** [December 4, 2019, 1:33pm UTC](https://forum.juce.com/t/option-to-use-real-assert/36496/1 "2019-12-04T13:33:48Z")

</div>

Would it be possible to add a define that lets you use a “real” assert so that if you run into an `jassertfalse`, then the app would “crash”.

I created an example here:

> <https://github.com/juce-framework/JUCE/pull/641>

In the example above you would still break at the line where `jassertfalse` is if running in a debugger.

One option that does not require any changes in juce is to redefine `JUCE_LOG_CURRENT_ASSERTION`, but then one needs to include `<cassert>`in different places. I think it would be best if the file, that defines what `jassertfalse` does, also includes the necessary headers.

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [December 5, 2019, 2:44pm UTC](https://forum.juce.com/t/option-to-use-real-assert/36496/2 "2019-12-05T14:44:59Z")

</div>

Same or similar topic discussed here: [Failed jasserts should crash debug builds even when debugger is not attached](https://forum.juce.com/t/failed-jasserts-should-crash-debug-builds-even-when-debugger-is-not-attached/31000)
