How to remove space and return symbols in Xcode setting - xcode11

I have been using Xcode to edit Python code. However, after recent update to version 11.1, I found the unwanted >>... signs between the code. I tried to get rid of it by fiddling with Xcode/Preferences but to no avail. How do I turn off these space/return symbols?

Go to Editor -> Invisibles, Make sure it is unchecked.

Related

Xcode 12.0 not showing variable when debugging

I have projects that I have created with earlier releases of Xcode. I was forced to upgrade to Xcode 12.0.
When I run my old projects, not tried all of them, I am not getting any variable declared outside of the current routine, the variables within the current routine do not show any value. I have created a new project and the same thing applies. I have checked old reports and all my optimization settings are none, and I have debug for my Build configuration along with many of the other suggestions on earlier versions of Xcode with the same problem. So there's probably something very simple that I need to do but I can't find it. Hope somebody has the solution.
for me what did the change is removing facebookSDK from swift packages and return to use pods.
Did you try going to warnings and pressing update to recommended settings?
Edit: The warnings are found in the tab that looks like an exclamation mark.
Open Menu
Product -> Scheme -> Edit Scheme -> Test
Tab [Info -> LLDB Init File]
Paste the following link
$(SRCROOT)/.lldbinit
I had the same problem, using Xcode 12.5.1, and eventually solved it by changing my default interactive shell to zsh, then closing and reopening Xcode.
To change the default interactive shell to zsh, use this command in a terminal (command line) window:
chsh -s /bin/zsh
I had already ensured that both Objective C and Swift were being compiled with no optimisation in debug mode, and that I was running a debug build of my app.
Before I made the change I couldn't see any variables, and no lldb commands worked. The change fixed both those problems.

Xcode will not compile my whole code

I just installed Xcode on my new iMac, and for some reason it will not run my entire code. My little brother was missing around with the setting and I don't know if that is the cause. Is there a way to reset Xcode to a default setting? I've already deleted it and reinstalled it but its still doing the same thing.
He either messed up your project or code, and caused a build error. The only thing Xcode can do is set the project's treatment of warnings as errors. On the left pane select the tab with the warning sign on it (triangle with a ! on it). It should tell you on that list why it didn't compile.
Try to make a new project and see if that one compiles. Then you know it is only your code. You're going to have to learn how to do debugging like this so your little brother is helping you.

Xcode Command-Slash Shortcut to Comment Only Works Sometimes

I'm having issues with Xcode being quite unreliable when using the keyboard shortcut to comment or uncomment code ⌘+/. I can't seem to find a real pattern as to when it breaks, but it usually happens after building and running my code on the simulator. It will not work again until I edit something in any one of my code files. Even if I switch to another file in the main view, commenting via shortcut does not work. Other keyboard shortcuts, such as indenting ⌘+[ continue to work just fine.
Do other people have this issue, and if so, have you found a solution? I know it seems like a small complaint, but when running and then quickly trying to comment out a block of code to check the effect, it's a bit of an inconvenience.
I am using Xcode 6.1 (6A1052d) on OXS Yosemite 10.10 (14A389) and developing in Objective-C for iOS if that matters.
For an Xcode 8, solution is
sudo /usr/libexec/xpccachectl
and restart your computer.
Hit ⌘+] once and then ⌘+/ will start working again.
You can hit ⌘+[ to undo the indentation effect.
Update:
Please note- This solution was provided prior to Xcode 8 launch so it may not work for everyone. If you are still facing problem, kindly refer to #CryingHippo's answer instead of downvoting.
I have done this numerous times with Xcode 8. Latest being Xcode 10.1 where I would just quit Xcode and go to Applications and rename Xcode to something else, e.g. Xcode 2, launch it, quit again and rename back. It starts working after that. No Mac restart or Terminal commands required.
It still works as of Xcode 10.1. I cannot believe Apple still hasn't fixed it properly.
None of the above solutions worked for me with Xcode 8.0 (final). If you also have Xcode 8.1 beta installed like I do, try this: simply rename /Applications/Xcode-beta.app to something else, then restart Xcode 8. Oddly enough, that did the trick.
Oscahie's answer actually works for non-beta versions of Xcode as well. Here are the steps to follow, based on Sam's comment:
Close Xcode
In the Application folder, rename Xcode.app (or similar) to Xcode2.app. You might need to type in your password.
Open Xcode, then close it.
Rename Xcode2.app back to what it was before.
(Optional) Spend 5 minutes wondering why this worked.
No need to reboot!
I didn't have to do any of the above. A simple reboot fixed it.
A simple workaround works good for me with following steps:
Comment any line i.e. simply add "//" in front of a line.
Press Command + "/" and it starts working.
It might help someone.
In my code I had this sequence:
/*" BLABLA MY COMMENTS */
All the code under this was not "commentable".
Removed the " and it was ok !
Hope it helps!
I just had the same issue after setting up a new Mac with Xcode 10.1 using the German keyboard layout.
The solution was to disable the Keyboard shortcut in system settings for the help menu.
System settings > Keyboard > Shortcuts > App shortcuts.
There was a shortcut for all apps to show the help menu.
If you have that, click the checkbox to disable it
I am using Xcode 8.1 (not beta) and I had the same problem, not able to cmd+\ to comment. Restart Xcode not working for me but RESTART my Mac SOLVED the problem without a need to remove cache.
I had this problem in Xcode 8.0. Even though I already move Xcode 8.1-beta somewhere else (It's at Application/Xcode otherversions/Xcode 8.1-beta.app). I have to delete it to the trash, restart Xcode 8.0, and cmd+/ somehow works again.
Just quit xcode completely and restart. Worked for xcode 8.2
I was also facing this issue, when having multiple Xcode installed.
In which Xcode version you are you facing this problem, to solve this, the Xcode should be in the Application Folder. If it resides in the subfolder than move it to the Application folder directly.
I found a pattern where toggle comments do not work.
In fact, uncomment works, but comment don't, from keyboard as well as from the Editor menu.
This happens in a specific file, suggesting there is something in text that prevents from working.
I tested on XCode 10.1ß and on XCode10.2, on different machines.
Text before this line can be commented, text after cannot (I kept text exactly as is)
let alert = UIAlertController(title: "" /*"Teste texte"*/, message: "Love\nWe'll recommend more for you" /* Entrez des chiffres"*/, preferredStyle: .alert)
It appears that the /* … */ inside the UIAlertController() is the cause.
If I suppress both comments inside, everything works OK.
I filed a bug report. # 49907361
Nothing above worked, even after trying multiple times.
Just reinstalled new xcode using AppStore app, previously I installed xcode after downloading from
developer.apple.com/downloads. that is .xip file
Wait for new update and install.
Another reason may be that xcode isn't in Application directory.

Xcode: not show warning in issue navigator

I have an Xcode project with plenty of warning (I know this is bad).
However I would like to use the Issue Navigator to locate errors? The problem is that all the warning are literally polluting the Navigator so it is unusable.
Is there any way to do that?
Please do not answer me that I should remove this warning. I would like to do that but can not for the moment.
I found the recently the solution.
there is a little button at the bottom of the navigator screen. It does exactly what I need.
You could edit your Xcode project settings and add the custom compiler flag -w to suppress all warnings.
You are in a bad place though...

Xcode completions, spelling checkings stopped

My Xcode 4.3.2 stopped to show up spelling errors and completions for code. The only way to find out if there is any error in the code - build it. Xcode colores only keywords such as if, else, for etc. All other code hasn't colored. Shown only a few very strange completions. For example:
CGPoint p;
p.y // completion is "YES"
p.x // completion is "xor"
Completions for methods calls are only nearaly used methods. How can I fix this? I rebooted my mac several times already, and didn't find any stuff about this in Xcode's preferences.
I also had this a lot of times, what helped for me was to set in the build settings precompile prefix header to NO
What I do to solve this issue is:
1.) Change build settings from LLVM 3.1 to GCC 4.2
2.) Go to Organizer>Projects>(Select Project)> Delete Derived Data
3.) Change Builds Settings back to LLVM 3.1
My syntax highlighting then works again. No need to restart Xcode, and jump through other hoops and hurdles.
Hope this helps you as it does for me !
UPDATE: Some people can get it working with only Step 2, if that doesn't work. Follow all 3 steps.

Resources