# How to use address sanitizer on Android/iOS in UE4 Project?

**URL:** <https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-android-ios-in-ue4-project/477481>\
**Category:** Mobile\
**Tags:** unreal-engine, iOS, memory, UE4, question\
**Created:** [January 19, 2021, 4:37pm UTC](https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-android-ios-in-ue4-project/477481 "2021-01-19T16:37:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_34439fee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_34439fee](https://forums.unrealengine.com/u/anonymous_user_34439fee)\
**Post date:** [January 19, 2021, 4:37pm UTC](https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-android-ios-in-ue4-project/477481/1 "2021-01-19T16:37:30Z")

</div>

I want to detects memory corruption bugs in my UE4 project’s c++ code on Android/iOS devices.  
Could anyone tell me how to use address sanitizer? Or another tools?

---

<div class="post-metadata">

**Author:** ![AliCormack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AliCormack](https://forums.unrealengine.com/u/AliCormack)\
**Post date:** [January 21, 2021, 12:00pm UTC](https://forums.unrealengine.com/t/how-to-use-address-sanitizer-on-android-ios-in-ue4-project/477481/2 "2021-01-21T12:00:26Z")

</div>

This article (with translation) is the best resource I’ve found for iOS.

> **[iOS Address Sanitizer в UE4](https://ue4daily.com/blog/ios-address-sanitizer-UE4)**
>
> В процессе разработки может случиться момент, когда приложение завершает свою работу в совершенно неочевидных местах в коде движка или вашего проекта.

You simply need to edit your build configuration in /UnrealEngine/Engine/Saved/UnrealBuildTool/BuildConfiguration.xml

```
    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
        <BuildConfiguration>
            <bEnableAddressSanitizer>true</bEnableAddressSanitizer>
        </BuildConfiguration>
    </Configuration>

```

However i’ve not worked out how to attach a debug cooked build to XCode and hit breakpoints. Info on that would be appreciated.

Also how to get it working with Android!
