# iOS Crashes and Session Replay Are Not Captured

**URL:** <https://community.dynatrace.com/t/ios-crashes-and-session-replay-are-not-captured/38286>\
**Category:** Troubleshooting\
**Tags:** mobile-monitoring, ios\
**Created:** [April 12, 2023, 8:10am UTC](https://community.dynatrace.com/t/ios-crashes-and-session-replay-are-not-captured/38286 "2023-04-12T08:10:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yngwie\_lucero](https://avatars.discourse-cdn.com/v4/letter/y/3d9bf3/32.png) [@yngwie\_lucero](https://community.dynatrace.com/u/yngwie_lucero)\
**Post date:** [April 12, 2023, 8:10am UTC](https://community.dynatrace.com/t/ios-crashes-and-session-replay-are-not-captured/38286/1 "2023-04-12T08:10:00Z")

</div>

In most cases for iOS, the crashes and session replay are not captured because of the debugger attached to the build. In this case, the debugger hooks and catches the crashes causing all crash handlers to not work properly.

If you have the debug logging enabled for iOS you should be able to see a warning from the logs:

 ![Screenshot 2023-02-06 at 4.50.10 pm.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/2e99b7395fa257dec2614fb839e577ffc73bd74c.png)  
If you see this message then you need to detach the debugger. By following the steps below:

1. In Xcode, go to “Edit Scheme” under your project target.

 ![Screenshot 2023-02-06 at 4.42.54 pm.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/3/2327292bbddcb270373c941f5bd7381bb2097242.jpeg)

2. Uncheck “Debug executable”

 ![Screenshot 2023-02-06 at 4.43.45 pm.png](https://global.discourse-cdn.com/dynatrace/original/2X/6/6e9d49ef561a5e729365443570acdc9e6882cd33.png)

3. Clean and build the application before running in simulator/device.

You can also detach the debugger on a per-run basis. This way you do not need to remove it from the scheme and just detach it for the current run.

 ![detach debugger.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/ed4764579333f0d085953990889347d45964bfe1.jpeg)  
See also&nbsp;[Session Replay on crashes for iOS: User sessions are not recorded](https://community.dynatrace.com/topic/232246)&nbsp;and&nbsp;[Session Replay on crashes for iOS: User sessions are recorded, but Session Replay is not available](https://community.dynatrace.com/topic/232245).

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [May 12, 2023, 7:27pm UTC](https://community.dynatrace.com/t/ios-crashes-and-session-replay-are-not-captured/38286/2 "2023-05-12T19:27:07Z")

</div>

Thank you for Sharing this!
