I just upgraded to Xcode 4, and I was reading a Xcode 4 Transition Guide when I found information about a new feature called Fix-it, which show the erros as I type. I am using C++ (.mm files) and set the compiler to LLVM GCC-4.2, but it is not showing the errors as I type. How can I enable this feature?
They don't show as you type like they say, or at least I haven't been able to get it to show the errors. It just shows you a red circle on the line number that you have to click to get the fix it suggestions. It's pretty lame, but you can use a keyboard shortcut to do the fixing at least. Thankfully they included a "Fix all in scope" key bind too.
Fix Next Issue:
control + Command + '
Fix Previous Issue:
control + Command + "
Fix All In Scope:
control + Command + F
Just tried looking again, and the closest thing I've been able to see about possibly showing errors as you type is to switch to issue navigator and leave that on. Your errors as you type will show up in there, but it is very discrete while in the code view. Then you can just click the issue in the navigator and you'll get your suggestions box, which is nice.
Related
I am aware that command + ' brings you to the next issue, but is there a way to bring you to the next compiler error and ignore the warnings?
(xcode 9)
I don't think there is a way to do that, but the closest thing you could do to that is to filter the display of issues in the Issue Navigator so it only shows errors and no warnings. Do that with one click, on the icon at the bottom right of the Issue Navigator.
Once you have done that, then the up and down arrow keys navigate you within the Issue Navigator from error to error instead of issue to issue.
To expand on auspicious99's answer, after filtering on errors in the issues pane, you can use keyboard shortcuts end to end:
cmd-5 - selects the issues pane
up/down arrows - select the error you want
cmd-j, enter - move the focus to the editor
In the navigator (the left-hand pane), choose the right-most icon that looks like a speech bubble. You'll see the build results, and when you click on them you'll be taken to the error.
I have seen this icon on Xcode 4.5 whenever I run a project. I have also seen this possibly on older versions of Xcode also, though I can't remember distinctly.
What could this possibly mean?
EDIT: The image was not previously loaded, have uploaded it now
EDIT 2: I wanted to know about the number 3 which is coming in the left side of the image. I understand the "114" denotes the warnings". Apologies for the ambiguous explanation in the question before.
It means you have warnings.
In this case you have 114 compiler warnings!
Click on it and you'll be taken to the correct tab in the project explorer where you can start working on correcting them.
As for the number 3, again, click on it - it shows you the number of tasks it is running.
Just try clicking on things in Xcode, you'll find a lot more information about it that way.
I've got a really frustrating issue in Xcode 4.2.1 on OS X Lion, where the code folding doesn't seem to work, or at least hardly every with no obvious reason.
The default keyboard shortcuts are supposed to be:
Fold Methods/Functions ⇧⌘⌥⌘← shift+option+command+left
Unfold Methods/Functions ⇧⌘⌥⌘→ shift+option+command+right
.. but I just get the Homer ('Doh'), error sound all the times I try it.
I always make sure I have the correct pane selected (before anyone asks ;o), and have also tried the following, with no luck:
- With & without Assistant editor enabled
- In a total separate editing window
- By selecting 'Code Folding >> Fold Methods & functions' from the Editor menu
- Changing the keyboard shortcut (Even tho no conflict was showing)
The only clue I have, and I'm not sure if it's related, is that whenever I press the 'option' key in the editing view my cursor changes to a + (or crosshair) - It only does this in the editing views of Xcode, however I don't think this is the issue as if I change the shortcut to not use the 'option' key, it still doesn't work.
Anyone got any ideas, as it's driving me barmy & my searches haven't come up with anything??
OK, I finally resolved to totally remove Xcode, clear out prefs and then re-install.
This seems to have fixed the issue (So far at least)
I've found that Xcode 3 won't fold unless syntax highlighting is turned on. I don't like syntax highlighting, so for lack of a better alternative I use 'View->Syntax Coloring->Simple Coloring', which only highlights comments and numbers.
Hey this is a small issue with XCode 4 that is annoying me. When i click on warnings or compile errors on the left hand panel, I am not taken to where the error is on the code. This used to work in XCode 3.x but no more.
Anyone else seen this?
Ive found a way that works more often than not...
In the left hand panel, click on the "Show the log navigator", its the button which looks like a speech bubble. Now underneath will show the logs for every build. This is like the old Xcode, and will show errors/warnings. When you double click on the errors it will open the file to the line of the error.
I had this same problem and fixed it by switching the compiler from LLVM GCC 4.2 to LLVM Version 2.0.
Since upgrading to Xcode 3.2, I miss the old style option + double click on a word to bring up the documentation within Xcode.
Now, I get the new 'quickhelp' menu, which isn't all that helpful, and just means that I need to click one more time to get to the documentation!
Is there an easy way to return Xcode back to its old ways? (I'm probably missing something in preferences!)
Holding Cmd + Option and double-clicking will take you directly to the definition of the symbol you clicked on in the docs. So you don't need to rewire the app if you can rewire your brain to just hold down one more key!