# Code does not work outside of debugging

**URL:** <https://forums.unrealengine.com/t/code-does-not-work-outside-of-debugging/341389>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** error, unreal-engine, CPP, question\
**Created:** [December 14, 2015, 2:52am UTC](https://forums.unrealengine.com/t/code-does-not-work-outside-of-debugging/341389 "2015-12-14T02:52:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [December 14, 2015, 6:02pm UTC](https://forums.unrealengine.com/t/code-does-not-work-outside-of-debugging/341389/2 "2015-12-14T18:02:20Z")

</div>

Hello sgp,

Breakpoints are not intended to work outside of debugging due to how breakpoints work. Breakpoints halt the process that the debugger is attached to when said process reaches a certain line of code. Without the debugger attaching itself to the process, the breakpoint can’t halt anything.

As for the log messages, if you wish you print things out to the screen it would be best to use AddOnScreenDebugMessage instead of UE\_LOG messages. You can find more about those output methods here:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

I’m not quite sure I understand your example that you use however. Do you mean that if you set up a UE\_LOG message to print, it won’t print unless you have the Output Log open when the event occurs? Are you sure it isn’t being pushed up the log by other messages?

---

_[View the full topic](https://forums.unrealengine.com/t/code-does-not-work-outside-of-debugging/341389)._
