xcode commit and transfer breakpoints from one computer to another computer - xcode

I'm looking a way to keep breakpoint settings between two computers with Xcode under github.
Addin that file:
server:myproject.xcodeproj alex$ ls xcuserdata/alex.xcuserdatad/xcdebugger/
Breakpoints.xcbkptlist
has no success.
Where i'm wrong?
UPDATE - it's working now, but i need to restart Xcode to see updated breakpoints. any chances to avoid it?

If you're trying to share through git, you probably have *.xcuserdatad ignored (if not, you should). If you don't mind everyone seeing the breakpoint, you can share it from within Xcode:
Right-click the breakpoint in the breakpoint navigator and select "Share":
You should now be able to add the file via git. It'll be in a location like this:
Test/Test.xcodeproj/xcshareddata/xcdebugger/Breakpoints.xcbkptlist
Anybody else working on the project should now be able to use that breakpoint.

Related

Intellisense not working golang test files

Title says it all. I open a test file. Type $package.. Nothing comes up. It's not a delay issue. It's not an empty package. How do I get intellisense to turn on?
Update: I've open a bug ticket with the VSCode-Golang team. As we find more information, I'll report back here. https://github.com/Microsoft/vscode-go/issues/2278
I'm not sure as to the whys and the wherefores, but the solution was to reinstall all of the Go tools in VSCode. Look for "Go: Install/Update Tools". I selected them all. Once they installed,restart VScode. At this point autocomplete turned on.
I didn't remember a VSCode update before things broke. If you run into this issue, try reinstalling the tools within VScode.
Be sure your opened go file, the one you try to edit, is part of the open project folder in vs-code, otherwise the auto-completion will not work properly. If you want to edit file from other module it's better to open the module folder in other instance of vs-code and edit it from there.
If the intellisense was already working and suddenly stops, you may try any of the below or both to resolve this.
Reset the VisualStudio settings as explained here. https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2008/ms247075(v=vs.90)
Delete the .VS folder from your project.

Xcode project crashing every time it is opened

Every time I open my project in Xcode ( Version 10.0 beta (10L176w) ) I get a crash.
What have I TRIED to do to fix the problem?
I have tried using Xcode 9 but that didn't seem to work either.
I have tried clicking another file as soon as I open the
project, but that does not seem to work.
I have tried going to the directory in the error log, but it would not take me there.
I have tried right-clicking on xxx.xcodeproj and then clicking Show Packaged Contents then deleting the xcuserdata folder (also tried with xxx.xcworkspace).
Expected result:
For my project not to crash every time it is opened.
Actual result:
A crash every time I open my project.
What caused it?
I can't know for sure what caused it, but it happened when I was adding Binaries and Libraries I created (I am new to it, so may have done something wrong). You can also see a few lines in the log screenshot about Frameworks, so this might have been the cause.
Why does it matter?
I am unable to work on my project, halting progress, as neither the .xcodeproj or the .xcworkspace will open. I am hesitant (and also it's bit of a pain) to edit the files to write my code. I wouldn't like to start ALL over again.
I am not looking to remake my project, and that is a last resort.
Is there some sort of project/cache cleaning I can do without opening the project (something similar to ⌘ + ⇧ + K)?
If you have any questions, please ask me. If you require a certain part of the crash log, let me know.
In the end, I just re-made the project. I started using git for the first time as well, so I will stay with that from now on, as it will reduce the chances of this happening again :)

Xcode source control won't commit

Problem:
When I hit "Commit..." under the Source Control menu in Xcode, the window comes up blank and I get a colorful pinwheel that doesn't stop spinning, so I have to force quit Xcode.
Details:
It's not a problem with Xcode in general because I can still commit other projects.
The version editor still works (I can still see previous commits I've made).
I've let the pinwheel run for over an hour, and still nothing happens.
I was able to commit this project up until a couple months ago. Since then, I added a few files to it, edited it a bit, updated Xcode if I remember right, and updated macOS.
Some of the files I added came from other projects.
I've tried removing some of the files I added and then committing, but that didn't work so I added them back.
I've tried cleaning the project, restarting Xcode, and restarting my mac.
I don't know much about source control, but I don't have anything fancy set up with a team or anything, it's just a local repository.
I've tried suggestions to delete various things inside the .xcodeproj file, to no avail.
I have Xcode 9.4.1
Any ideas?
If you have added big files (larger than 100mb) then sometimes Xcode has trouble with them. Try unstaging your commits and then committing them again. Finally try reverting back to the most recent version of your project and working from there.
I had the same problem. Sometimes selecting "Fetch and refresh status" works. The next time you go to commit the files will show up.
I found that rebooting my computer fixed the problem.

Xcode 4.2 Product -> Run Greyed Out

My "Run" button under "Product" is greyed out and after trying a few things from various forums, can't figure out what's gone wrong.
I've tried removing the project.xcworkspace and xcuserdata files and letting xcode generate new ones, but no...
My co-worker uses AppCode from IntelliJ and when he pulls the code, it runs just fine. But if he opens the same files in his Xcode, his "Run" is also greyed out.
"Edit" your current "Scheme":
Make sure you have "Run" checked for that build target:
The scheme need to be fixed (I don't know why xcode changed it)
Here are the required steps:
, ,
Make sure you have the correct target selected.
(Upper-left in Xcode window, near the triangular Run button.)
My co-worker who uses AppCode had edited the configuration file, moved some frameworks around, etc... We noticed that there was a difference between XCode and AppCode in using relative vs. absolute paths in the project.pbxproj file.
Ultimately I just reverted the code to before his changes, so at this stage, I'm not entirely sure which difference in the config file actually caused Xcode to not be able to Run the project.
**EDIT
From the .git logs, it looks like AppCode was adding relative directories with 7 sets of "/../" and before there were only ever instances of 5 "/../" to get back to the root directory.
Rather frustrating that Xcode had no way of dealing with this from inside the IDE.

Xcode 4 code sense is not working

I am running a "old" Xcode 3 project in Xcode 4 and code sense is not working for my own classes. I have tried following:
Clean/rebuild
Remove Derived Data
Installing 4.3 documentation
Restart
Without any luck.
Sometimes the code sense works but mostly I just get "No Completions".
Try this:
Open Organizer then Project Tab.
Clear the "Derived Data". Xcode should re-index your project then and code sense should work. At least worked for me.
I know this is late, but for reference: http://sealedabstract.com/code/when-xcode-4s-code-completion-autocomplete-breaks/
Close the project, leaving XCode still running.
Open XCode’s Organizer window, go to the Projects Tab, select the correct project, and hit the Delete button next to “Derived Data”.
Quit XCode.
Navigate to your project’s .xcodeproject file in Finder. Right-click, choose “Show Package Contents.”
Leave the project.pbxproj file, but delete the project.xcworkspace file, any .pbxuser files, and the entire userdata folder.
Open the project in XCode. You will see XCode riding high on the CPU usage for around 10-60 seconds, depending on the size of your project. The activity window will say “Indexing”
When your CPU spike returns to earth, code completion will be working again.
There's a lot of deleting going on there so please be careful, but this definitely worked for me.
I've been doing this, and it's worked multiple times for me (after trying all of the above previously).
Edit: Now I just hit space, backspace (the mac version) and rebuild... works nice. Then, remember to scroll (sometimes the colors don't show up until you scroll somewhere)
Find your prefix file: "ProjectName_prefix.pch".
Comment out some line. (basically change it)
Build your project, doesn't matter if it fails or not.
Uncomment it.
Build again.
I'm betting only step 2 (modify the prefix) is what does it, but these essentially get you back to running. Suddenly everything magically recolors itself and completes functions.
Good luck if that doesn't fix it, perhaps try doing this to your dependency pch files (three20 or FB api's)
Clearing the "Derived Data" only works temporarily for me. I have to do it and then restart Xcode like 3-4 times each day to get code sense working again.
I found out the real cause is in the Target's Build Settings. I moved everything from Header Search Paths to User Header Search Paths and it is fixed. In my case, the framework I'm working with is RestKit.
BTW, I came up with this because I was adding another project (QuickDialog) into my project and I was curious that it is using User Header Search Paths, but not Header Search Paths. Here is the difference between them.
You can able to fix that issue by change build settings like this, PreCompile Prefix Headers :NO
FYI, if one file doesn't have code sense but the rest of your project does, check that its added to a target. Once I did that I got code sense back in that file.
It's been ages but the answer is just to move the code into a new folder and the code sense should be working now.
This happened when I added a new Objective-C Class and the code sense doesn't work only on the newly added .m and .h files (on XCode 4 latest update during this post).
Close all xcode windows
Delete all your projects from xcode>window>organizer and restart your project. It will now sense and index your project properly.
I wrote about it in detail here.
Basically my fix was that with localization. I upgraded from xcode 3.2.5 to xcode 4 and then screwed around with built in interface builder and turned on localization for a XIB file accidently which placed my source files in en.lproj directory. After moving them back to Classes folder it worked perfectly.
Again, for the sake of helping others with this issue which, in my case, happened upon upgrading to Xcode 4.3.
Of course I tried the solutions offered in this post, and none of them worked. But the suggestion to move the location of the project in Finder brought back some Code Sense, but the suggestions didn't make any sense.
I ended up deleting my project and re-cloned it from the git repository.That brougt back Code Sense for me...
I open a second project in the background whenever my Xcode's code sensing stops working (it usually works the first time i open the project but after a while code sense no longer works). So what i do is to open a second project in Xcode. Xcode will start indexing the second project and magically the code sense for my main project is back.
Running Xcode 4.3.1 on Lion
Hope this helps someone.
From this comment here I was able to debug the problem on my end, it seemed to be a bad -w flag that the clang preprocessor wasn't recognizing properly. Basically, running
defaults write com.apple.dt.Xcode IDEIndexingClangInvocationLogLevel 3
in Terminal increases the verbosity of the indexer, and should help you track down issues. Open Console.app and look for messages from Xcode, the search string IDEIndexingClangInvocation helped me find them.
For me it happened simply because the file had no target membership. If the first few answers did not work for you, go to your .m file (presumably it's this file that you're having trouble with), open the Utilities view (Edit -> Utilities -> Show File Inspector) and under "Target Membership" check the target to which you want this file to belong.

Resources