I'm having trouble finding much in the way of information about the new XCode layout. How can I view the disassembly of my source file, rather than just the C++ code?
-
4In newer versions the assistant editor contains the corresponding views: Preprocess, Assembly and Disassembly. http://stackoverflow.com/questions/5937031/xcode-4-preprocessor-output – jmihalicza Oct 19 '11 at 16:21
5 Answers
In Xcode 4.2 (and Xcode 5), you can see the assembly or disassembly for a file by:
- Showing the assistant editor (command+option+Enter is the default shortcut).
- In the JumpBar, select the tuxedo icon and select "Assembly" or "Disassembly" from the drop-down list.
You can view the Assembly for a file whether or not you're running the application. Disassembly is only available when the application is running and being debugged.

- 7,533
- 2
- 37
- 64

- 11,049
- 13
- 50
- 76
-
2... with the observation that in 6 the tuxedo icon is now four squares linked by bridges. It's the topmost and leftmost thing. It'll be above the line numbers column if you have that enabled. – Tommy May 27 '15 at 20:08

- 3,366
- 1
- 20
- 24
-
1This works on XCode 10, you just have to make sure you are at a breakpoint. – Sojourner9 Sep 06 '19 at 20:46
You can also display disassembly by navigating to:
Debug->Debug Workflow->Show Disassembly
while debugging.
This will display source and disassembly in the main window view.

- 6,538
- 6
- 44
- 64

- 196
- 1
- 4
On Xcode 6 you can go to the menu "Debug -> Debug Workflow -> Always show disassembly".

- 6,746
- 4
- 38
- 55
From what I read in a very thorough XCode 4 review (http://fireballed.org/linked/2011/03/09/xcode-pilkington/), the ability to show a file as assembly code is now gone in XCode 4. I guess you could always set a breakpoint in a method, and look at it disassembled in the debugger console with something like the "x/100i" command to treat print out the next 100 instructions in assembly, but that is a lot less convenient.

- 431
- 2
- 6
-
5In Xcode 4.5 you can see the disassembly alongside the code using OldPeculiar's answer – mpipe3 Jan 11 '13 at 17:54
-
Indeed, the functionality was re-introduced back into XCode -- nearly two years later. – Promit Apr 01 '14 at 16:55