I want to check the output of the preprocessor for some files. How can I view the preprocessor's output in Xcode?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- back button text does not change
- iOS (objective-c) compression_decode_buffer() retu
- how to find the index position of the ARRAY Where
相关文章
- 现在使用swift开发ios应用好还是swift?
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- Popover segue to static cell UITableView causes co
- “Storyboard.storyboard” could not be opened
You can always just run the preprocessor on the files from the command line using the
-E
flag withllvm-gcc
(this is what Xcode 4 uses as a replacement for GCC). Something like this:Then you can just open up the output file in a text editor.
<menubar> -> Product -> Perform action -> Preprocess <the name of your file>
@whoKnows's excellent and concise answer applies to Xcode 6 users. The preprocessor menu seems to wander all over the place from one Xcode version to another.
To recap: XCode 6 users can view preprocessor output by pulling down this menu:
as illustrated in the accompanying screenshot. I couldn't find this anywhere in the Xcode documentation.
(I hope this helps. I would have preferred to simply add a comment to @whoKnows's answer, but I don't have privileges for that yet.)
I did not find any way too. Seems that "Preprocess" feature is missing in Xcode 4. I haven't read any document from apple, where they mentioned anything about this.
Following uri might help you: http://pilky.me/view/15
Xcode 4.1 features now "Preprocessor or Assembly Output". All be happy!
You can choose the "Show the Assistant editor" view in the top right set of buttons in the toolbar.
Then, at the top of the right-hand editor you can click the little
Related Files
button and then either choosePreprocess
orAssembly
.You can see an example of both the preprocessor output and generated assembly code all side-by-side here: