I migrated a project from the previous version of Xcode to Xcode 8. What I want is to use the new visual memory debugger. It's available in new projects, but is entirely missing in my imported one. Why is this?
-
I guess you should update your project to recommended by Xcode 8 settings. – Evgeny Karkan Jun 14 '16 at 22:54
-
Do you see any yellow triangles (warnings) asking you for update? – Evgeny Karkan Jun 14 '16 at 22:55
-
I just clicked those, but the problem persists. – PopKernel Jun 14 '16 at 23:02
-
Do you use a 64bit simulator? – adnako Oct 31 '16 at 05:35
-
Does this work on Objective-C code? I can get to the memory debugger, but it doesn't seem to do the runtime issue detection per https://useyourloaf.com/blog/xcode-visual-memory-debugger/ – Liron Yahdav Mar 23 '17 at 21:33
5 Answers
It appears that Swift 3 is required for Visual Memory Debugger to work.
My app migrated to Swift 2.3 did not work, when I tried migrating it to Swift 3.0 it worked instantly.
The runtime sanitization checkbox is not required for visual memory debugger to work, however the reason that it is disabled is the same.

- 3,946
- 2
- 21
- 27
-
5Confirmed in the [Xcode 8.0 beta release notes](http://adcdownload.apple.com/WWDC_2016/Xcode_8_beta/Release_Notes_for_Xcode_8_beta.pdf): "Please note that several new features in Xcode 8 are not supported for projects that use Swift 2.3. These include: • Memory graph debugging • Address Sanitizer • Thread Sanitizer • Core Data build-time code generation To be able to use these features you must migrate your Swift code to Swift 3. (26003920)" – zpasternack Jun 15 '16 at 07:56
It seems like the project requires Swift 3 to enable Adress & Thread Sanitizer (which is the Memory Debugger).
For me this applies to both iOS & OS X/macOS apps. Both written in Swift 2.2 & converted to 2.3.
Note: I only tested this on OS X El Capitan 10.11.5.
@gabriellanata confirms that it works when the code is converted to Swift 3.

- 4,746
- 2
- 26
- 50
-
1Memory debugger is not compatible with the thread sanitizer. You can't run both at the same time. – tzm41 May 03 '17 at 23:23
I just ran an Objective-C iOS 7 project made with Xcode 7 in Xcode 8 (without migrating) and the Visual Memory Debugger icon appears at the bottom of Xcode in the debugging area next to the Debug View Hierarchy button.
It's the button with the three circles.
From the other comments, it looks like Swift 3 might be required to use this feature.

- 41,701
- 23
- 172
- 300
-
It's not there. Maybe it has something to do with my project being a mac app? – PopKernel Jun 14 '16 at 22:57
-
Hmm, maybe. What version of OS X were you targeting before and what version of Xcode was the project created with? – JAL Jun 14 '16 at 22:58
-
1wait, what about "runtime sanitation"? it's toggled on in the scheme of new projects, but not in mine. It's greyed out, saying "requires recompilation" – PopKernel Jun 14 '16 at 22:59
-
-
-
-
iOS app. Originally on Swift 2.2 and migrated to Swift 2.3. Old minimum OS target was 8.0, tried increasing to 10.0 bit it still does not work. I have the "runtime sanitation" toggle grayed out too and I cannot figure out how to enable it. – gabriellanata Jun 15 '16 at 04:02
-
2The memory debugger also requires that you use a 64-bit target for iOS builds. Took a bit to figure out the iPad 2 sim was selected in my environment -- changed to iPad Air 2 and the Debug Memory Graph button appeared. – savvyx4 Aug 03 '16 at 03:49
-
It works for me with Objective-C project in `Version 8.0 beta 5 (8S193k)` – Iulian Onofrei Aug 12 '16 at 11:56
Argument '-sanitize=address' is not supported on the Swift 2.3 toolchain.
You will need to migrate your project to Swift 3 to use this feature.
Xcode 8 GM build error
P.S. Objective-c supported by Visual Memory Debugger

- 3,067
- 36
- 30
If you click on Memory, the source editor pane will change to show some memory information, including why it's disabled. In my case, it was because I had Zombie Objects enabled in the Scheme. (Xcode 8.3.2)

- 3,298
- 3
- 29
- 47