# To many debug messages will cause editor to freeze solid

**URL:** <https://forums.unrealengine.com/t/to-many-debug-messages-will-cause-editor-to-freeze-solid/370506>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** freeze, unreal-engine, crash, hang, question\
**Created:** [September 15, 2016, 5:02am UTC](https://forums.unrealengine.com/t/to-many-debug-messages-will-cause-editor-to-freeze-solid/370506 "2016-09-15T05:02:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Burnrate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burnrate](https://forums.unrealengine.com/u/Burnrate)\
**Post date:** [September 15, 2016, 5:02am UTC](https://forums.unrealengine.com/t/to-many-debug-messages-will-cause-editor-to-freeze-solid/370506/1 "2016-09-15T05:02:26Z")

</div>

Do something silly like place a GEngine-\>AddOnScreenDebugMessage(…); inside a loop going over 60k verts inside the tick function and the editor will hang after several million messages (maybe it runs out of keys?).

I have to do an end process or Stop Debugging in VS to end the editor which has become unresponsive.

Maybe have some kind of check or handling of excessive messages? 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [September 15, 2016, 1:05pm UTC](https://forums.unrealengine.com/t/to-many-debug-messages-will-cause-editor-to-freeze-solid/370506/2 "2016-09-15T13:05:28Z")

</div>

Hey Burnrate-

Attempting to do loop through anything 60,000 times each frame is going to cause performance issues. On top of this, draw calls and debug messages are already expensive processes and making this many calls is going to have an impact on performance. You can instead try writing a message to the logs rather than using a debug message on screen. I would also suggest only making this call when necessary rather than on tick as well as making your loop size smaller if possible to reduce how much information is being processed at once which will help performance.

Cheers

---

<div class="post-metadata">

**Author:** ![Burnrate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burnrate](https://forums.unrealengine.com/u/Burnrate)\
**Post date:** [September 15, 2016, 1:09pm UTC](https://forums.unrealengine.com/t/to-many-debug-messages-will-cause-editor-to-freeze-solid/370506/3 "2016-09-15T13:09:33Z")

</div>

Absolutely 🙂 I didn’t mean to have the message in there at all! I was just thinking it would be good if there was a way to debug when this happens as opposed to the editor just freezing. Thanks!
