# Jassert (in debug build) doesn't stop the application when run outside of development environment?

**URL:** <https://forum.juce.com/t/jassert-in-debug-build-doesnt-stop-the-application-when-run-outside-of-development-environment/52406>\
**Category:** General JUCE discussion\
**Created:** [August 1, 2022, 7:55am UTC](https://forum.juce.com/t/jassert-in-debug-build-doesnt-stop-the-application-when-run-outside-of-development-environment/52406 "2022-08-01T07:55:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kraku](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kraku](https://forum.juce.com/u/Kraku)\
**Post date:** [August 1, 2022, 7:55am UTC](https://forum.juce.com/t/jassert-in-debug-build-doesnt-stop-the-application-when-run-outside-of-development-environment/52406/1 "2022-08-01T07:55:57Z")

</div>

It seems that jassert() doesn’t do anything, including stop the application (debug build), if I run the executable by traditional means, i.e. not from Visual Studio etc. Letting them do their traditional thing would be useful when sending a build to testers so the application can trigger the assertions if something goes wrong.

Is there a way to activate those jasserts when running the application by simply double clicking its icon?

---

<div class="post-metadata">

**Author:** ![mathieudemange](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mathieudemange/32/13333_2.png) [@mathieudemange](https://forum.juce.com/u/mathieudemange)\
**Post date:** [August 1, 2022, 10:03pm UTC](https://forum.juce.com/t/jassert-in-debug-build-doesnt-stop-the-application-when-run-outside-of-development-environment/52406/2 "2022-08-01T22:03:21Z")

</div>

Those need a running debugger attached to the actual application process in order to pause execution, use breakpoints, etc. For your testers, you would probably use some logging mechanism. JUCE has some classes for that.

---

<div class="post-metadata">

**Author:** ![Kraku](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kraku](https://forum.juce.com/u/Kraku)\
**Post date:** [August 2, 2022, 8:28am UTC](https://forum.juce.com/t/jassert-in-debug-build-doesnt-stop-the-application-when-run-outside-of-development-environment/52406/3 "2022-08-02T08:28:53Z")

</div>

Is it possible to log the jassert()'s?

---

<div class="post-metadata">

**Author:** ![mathieudemange](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mathieudemange/32/13333_2.png) [@mathieudemange](https://forum.juce.com/u/mathieudemange)\
**Post date:** [August 2, 2022, 9:04am UTC](https://forum.juce.com/t/jassert-in-debug-build-doesnt-stop-the-application-when-run-outside-of-development-environment/52406/4 "2022-08-02T09:04:43Z")

</div>

There’s a `JUCE_LOG_ASSERTIONS` define you can use. Then, in your case, you’ll need to create a `juce::FileLogger` instance and pass it to `juce::Logger::setCurrentLogger (...)` to register it.

---

<div class="post-metadata">

**Author:** ![Kraku](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kraku](https://forum.juce.com/u/Kraku)\
**Post date:** [August 2, 2022, 12:59pm UTC](https://forum.juce.com/t/jassert-in-debug-build-doesnt-stop-the-application-when-run-outside-of-development-environment/52406/5 "2022-08-02T12:59:20Z")

</div>

Thank you! I’ll try that.
