According to Xcode Instruments 8.3 Display Settings button missing, many of the options previously present in the right-side "record settings" pane in Instruments 8.2.1 have moved to the bottom bar. However, I consistently seem to be missing settings that were previously present.
As a specific example, take the Points of Interest instrument (see Alternative to DTSendSignalFlag to identify key events in Instruments? for details on its use). Here is a blank template to which the Points of Interest instrument has been added in Instruments 8.2.1:
Note the options in the bottom-right pane, like "Color using last argument." Here's the same setup with Instruments 8.3.3:
As far as I can tell, those options are gone. This is also the case for beta versions of Instruments 9.0. Where are those options hiding, or have they been removed entirely, just a year after their introduction?
Here, under File > Recording Options:
Apple called out this move very strongly when it was made.
It's obnoxious how non-discoverable this is, but you can get to Recording Options by holding down the Option key while clicking on the Record button.
Related
With Xcode 10.2, I could select the "Authors" view, then select a previous git revision to blame from the bottom picker:
But with Xcode 11 beta, when I select the "Authors" view, I'm unable to select a past revision to blame because the picker is missing:
Was that feature removed, or are there new steps to do to blame the lines of code for a past revision? To illustrate it even more, I'd like to see in Xcode 11 a past Blame like GitHub does when you blame a specific previous revision.
It has been moved here
It has been moved here
for a git blame version click Editor->Author as it, sure it moved
you can select the icon located in top-right of Xcode to find a previous revision
Select the icon in the window title bar to enter "Code Review" mode.
git log (History) is available at Cmd-Alt-2. There you can open a specific commit in code review mode via the context menu.
Mine wasn't showing up until I went to Editor > Show Last Change For Line. After I selected that, the 'Authors' row appeared in Editor > Authors, as well as in the 'Adjust Editor Options' icon in the top right of the page.
Answer to the original question:
You can't. Since Xcode 11, you can only git-blame your working copy. Note: This is my suggested answer after a lot of trying and googling. I'd be happy to learn the opposite.
Further information:
Many people, including me, seem to land on this page because they don't find the git-blame feature AT ALL in Xcode 11.
In Xcode < 10, the version editor came in three flavors: 1) Comparison view (=side-by-side diff), 2) Author (=git-blame) 3) Log. In all three flavors, you could choose a specific revision to look at.
In Xcode >= 11, the version editor (now called “Code Review”) only encompasses the comparison view (=side-by-side diff). The Code Review mode is toggled on/off with the double arrow button in the tool bar.
The Authors view (a.k.a. git-blame) is now a side-pane of the normal editor and can be toggled on/off in the Editor main menu. THIS OPTION IS NOT AVAILABLE WHEN YOU ARE IN CODE REVIEW MODE! For me, this caused confusion when looking for the Authors view.
The fact that the Authors view is not part of the version editor might be the reason that we cannot choose to look at arbitrary revisions. I have filed a suggestion with Apple to re-enable this feature. You should consider to do the same to give the issue more visibility.
In Xcode 11, the previous "Authors" menu item doesn't appear by default in the menu set. The simplest way to make it appear is to press the default key bind shift+control+command+A. After that, you'll find that "Minimap", "Authors", and "Code Coverage" now appear in the "Editors" menu.
If you go up to the top of Xcode, go to "View" and tap on "Show code review", you'll be able to get the git history with author information like on older versions of Xcode.
I am positive that in the past, it has been possible to export an unsigned Mac app from Xcode without enrolling in the Developer Program. However, now I am getting this screen:
It is NOT signed. Here's a screenshot of my configuration:
So, the question is, why is the "Export..." button greyed out?
Edit: I wrote this years ago, but to clarify (if I remember correctly), the issue was a conflict between the project-wide build settings and the build settings for the particular target. The solution is to remember when you use the project editor, you have to highlight the right entry in the projects/targets list, remember that bolded settings override the default, and the final value is determined by the most specific override. If you are stuck, select the "Levels" view at the top of the "Build Settings" tab and it will show how each setting is determined. "Levels" mode is ordered left to right in order of decreasing precedence; the leftmost column is the final value, and the rightmost is the default. See the docs for more info.
Actually, it was signed.
The problem lies in the way Xcode manages code signing settings. Simply setting the "Signing" option to "None" in the "Identity" section of the project configuration does not completely change it, and causes tools like CocoaPods to still attempt to sign it.
In order to completely disable code signing, you must set up the "Code Signing Identity" part of your Build Settings like this:
I'm trying to disable line wrap in Xcode 4.3.2 (4E2002), but the setting doesn't seem to work. I seriously HATE line wrapping and it makes me super-unproductive. I've always had it turned off before, but since the latest XCode-update, it is enabled regardless of setting.
Is this an Xcode bug?
This is my settings dialog:
This comes by some files you have set Wrap line in Show the File inspector.
Please choose a file. View -> Utilities -> Show File inspector then deselect Wrap lines in Text Settings section.
I had >ONE< file out of two dozen that was wrapping it's text in the XCode editor. Although I don't know how/why the file got into this state, I figured out what it was and how to fix it.
If you show the XCode right-hand Utilities pane, and select the Document icon at the top left, you'll see a variety of settings relevant to that one file, including it's name, type, and location. Below that are some "Text Settings" values, including a checkbox for "Wrap lines". If that box is checked, it overrides the XCode preference and wraps the lines.
This picture shows the XCode editor areas, in case you are confused: XCode Editor Areas
In Xcode 4 (4.2), is there a way to keep the Project Navigator view open and Debug Navigator view open as well. Must a user have one or the other, but not both? And the other navigators?
Apple seems to have decided that if you want to see the debug view, you don't want to see the files in your project. WTH? Am I getting this wrong? Did Apple Xcode UI guys even talk to developers before designing the UI for Xcode 4?
Sigh...
You can indeed have more navigators open at once, if you are prepared to have multiple windows open. I know it's not exactly what you're asking for, but for multiple display setups it's very handy. Xcode provides "behaviors" to help automate this process if you only want certain things showing at certain times.
For example, a common pattern that developers follow is to setup a behavior for "Run starts" that opens up a new window setup for debugging. Start by creating a new tab in your main Xcode window by pressing command-T, and double-click on the tab's title to rename is "Debug", or whatever you like. Then drag that window out (or leave it as a tab if you like), and customise the view as required - for example, for a deb window you might have the Debug area showing at the bottom (or even covering the whole editor view), and remove the toolbar at the top by right clicking and selecting "Hide Toolbar".
Next, go to "Xcode > Behaviors > Edit Behaviors..." and choose "Run starts" in the left panel. Check the box for "Show tab" and enter the name of your newly created tab. You can also ask that tab to automatically show the Debug Navigator, and show the debugger with variables and/or console view. If you like, you can then choose "Run completes" and show the original "tab" (window), which I've setup to be called "Coding", and show the required navigator (in my case, Project Navigator).
On successfully running, Xcode will now open up your new window (or bring it to the front if it's already open) with all the settings you left it with. On stopping, your main editor will be brought back to the front.
There are loads of useful behaviors, so I would really recommend looking through them and taking the time to setup Xcode to suit your style as best as possible. All software dictates to the user how to go about doing things, and the developers can never please everybody when they decide to change the UI. The best anybody can hope to achieve is to customise the interface as best as they can to fit their style of working. If it's still an issue for you, you can either adapt to it, or, if possible, move to something else.
I'm not a fan of every new interface feature in Xcode, but I've "made it mine" with some customisations and I can still be very productive. That being said there are a lot of things that I do really like about it, and for that I can forgive it for some of the less friendly features - after all, you can't please every user.
I have an app that is crashing with no error tracing. I can see part of what is going on if I debug, but can't figure out which object is "zombie-ing".
Does anybody know how to enable NSZombie in Xcode 4?
Environment variables are now part of the "scheme".
To edit the scheme and turn on zombies:
In the "Product" menu, select "Scheme" > "Edit Scheme...".
Go to the "Run Foo.app" stage in the left panel, and the "Arguments" tab on the right.
Add NSZombieEnabled to the "Environment Variables" section and set the value to YES, as you could in Xcode 3.
In Xcode 4.1 and above, there's also a checkbox on the "Diagnostics" tab of the "Run" stage to "Enable Zombie Objects".
With Xcode 6.4:
I encountered the same problem with troubleshooting EXC_BAD_ACCESS and had hard time to find the setting with Xcode 4.2 (the latest one that comes with iOS5 SDK). Apple keeps on moving things and the settings are no longer where they used to be.
Fortunately, I've found it and it works for the device, not just Simulator. You need to open the Product menu in the Xcode, select Edit scheme and then choose the Diagnostics tab. There you have "Enable Zombie Objects". Once selected and run in debugger will point you to the double released object! Enjoy!
In short
Product->Edit Scheme->Diagnostics-> Click Enable Zombie Objects
Product > Profile will launch Instruments and then you there should be a "Trace Template" named "Zombies". However this trace template is only available if the current build destination is the simulator - it will not be available if you have the destination set to your iOS device.
Also another thing to note is that there is no actual Zombies instrument in the instrument library. The zombies trace template actually consists of the Allocations instrument with the "Enable NSZombie detection" launch configuration set.
It's a simple matter of setting an environment variable on your executable (NSZombieEnabled = YES), and then running/debugging your app as normal.If you message a zombie, your app will crash/break to debugger and NSLog a message for you.
For more information, check out this CocoaDev page: http://www.cocoadev.com/index.pl?NSZombieEnabled
Also, this process will become much easier with the release of 10.6 and the next versions of Xcode and Instruments. Just saying'. =)
Product > Profile will pop up Instruments. Select zombies from the panel and go nuts.
Go to Product - Scheme - edit scheme - Arguments - Environment Variables set NSZombieEnabled = YES
In xcode 4.2
Goto, Product -> edit scheme -> click Run yourappname.app -> Diagonostics -> Enable Zombie object.
Here's a video and explaination how to use Instruments and NSZombie to find and fix memory crashes on iOS:
http://www.markj.net/iphone-memory-debug-nszombie/
As of Xcode 3.2.5 and Snow Leopard (Mac OS X 10.6), you can run your code through the Zombies instrument: Run > Run with Performance Tool > Zombies. That allows you to see particular objects and their retain counts on a timeline.
In Xcode 4.5.2 goto Product -> Edit Scheme -> and Under the Diagnostics tab check the check box in between Objective C and Enable Zombie Objects and Click on OK
To enable Zombie logging double-click the executable in the executables group of your Xcode project. At this point click the Arguments tab and in the Variables to be set in the environment: section, make a variable called NSZombieEnabled and set its value to YES.
In XCode 4.0: To detect NSZombie in Instruments, select the Simulator as your target (can't detect NSZomboe on device). Run Instruments (CMD+I) and select "Zombies" trace template. Enjoy.
In the preferences of your executable add the environment variable NSZombieEnabled and set the value to YES.
in ur XCODE (4.3) next the play button :) (run)
select : edit scheme
the scheme management window will open
click on the Arguments tab
you should see : 1- Arguments passed on launch
2- environment variables
inside the the (2- environment variables) place
Name: NSZombieEnabled
Value: YES
And its done....
NSZombieEnabled is used for Debugging BAD_ACCESS,
enable the NSZombiesEnabled environment variable from Xcode’s schemes sheet.
Click on Product⇒Edit Scheme to open the sheet and set the Enable Zombie Objects check box
this video will help you to see what i'm trying to say.