Using D2007. Sometimes breakpoints will not disappear. I can remove them from the unit and run the program; and the debugger will break because the breakpoint has resurrected itself.
If I remove the breakpoint and close and reopen the file, it comes back.
I did discover what the issue was some years ago. But I can no longer remember. Does anyone has a clue ?
I remember now that I deleted them from the Breakpoints View last time. I decided to try the file deletion as suggested by David.
I changed to a different project group, deleted the breakpoints section from the dsk file of the original project group and switched back. But the breakpoints came back. So I exited the IDE and deleted that section and restarted - and now they are gone.
I was intrigued as to why this happened, so I looked at the backup of the dsk file. I discovered the breakpoints were pointing to files on the C drive which is where the source used to be. I shifted them to the E drive a few years ago when I went to Windows 7.
It would appear that when it applies them it disregards the drive. But when you try to delete them, it tries to match the whole path.
Related
Xcode 6 never gets past "Loading" when I try to create a new project. I actually was able to create a new project yesterday, but I decided to just ditch it completely (deleted). Clearly there must be a bad file somewhere, possibly related to the project I deleted, since I also see the same stalling behavior now with Xcode 5.1, which has worked fine for creating new projects in the past. Xcode 6 has worked fine when starting with an already existing project and still appears to do so. I did not see this exact problem in your data base, though one person saw the project creation freeze before reaching the stage I get to. Their solution was to delete Xcode and every possible file related to it, which I'm a little squeamish about, since I don't want to affect existing projects, and don't have an understanding of what the various files are for.
Deleting the DerivedData of Xcode should fix the issue. You can do this by heading to ~/Library/Developer/XCode/DerivedData (with a Finder window open press cmd+G) and deleting all the subfolders of it.
This is embarrassing, but if it could happen to me, maybe it could happen to someone else. The problem was that the window that came up after the second step in defining the type of project to be created, the one in which you choose where to save the project's files, extended off the bottom of the screen, so that only the very tops of the buttons were visible. Eventually, I realized the one to the far right might be the one to click to continue. Which it was. Feel free to delete this question.
This question already has answers here:
SourceKitService Terminated
(34 answers)
Closed 8 years ago.
I have seen other questions with a similar problem but mine looks a bit more serious. Xcode keeps crashing on me. I have no chance to even edit a single character in my code. It is a very simple playground file with some basic code, nothing fancy. I'm not able to do anything at all in the current state.
When Xcode crashes, I hit reopen and the same thing happens again.
Locate the playground file using the Finder, then right click and select 'Show Package Content'. Next select the swift file, right click and open it using your favorite text editor (which must not be Xcode :)).
Once there, either delete its content or surround your code with comments. In the latter case, you can reopen the playground file in Xcode and selectively uncomment code line by line to know which line(s) cause Xcode to crash.
I've verified that there some recurrent patterns in code that almost always makes Xcode to crash, for example, when I use 2 or more custom operators in the same statement. I don't know if it that happens for all custom operators, or it's my specific implementation - either case, I know that I have to avoid that combination. You should take note when you notice a particular combination of code regularly making Xcode crash, and try to avoid it by splitting into multiply lines when possible.
Here's what I did to resolve it. I did reinstall Xcode a couple of times. It looks stable now but I'm not sure till when it would remain so. Looks like a bug to me. I will file it with Apple
While I was working on this Xcode project, compile and run an app, the two files suddenly gone!!!
It was working fine and I run the app a few times already. Anybody has any clue why is it happening?
My Mac is warning for Disk Space recently. Would it be something related?
Please help...I have been working on the project for a few weeks already. Anyway I could recover what I lost? I archive it a few hours ago into an IPA, can I recover the lost files from there?
Thanks a lot.
EDIT-------------------------------------
The Files are gone and I have to work for 12 hours to get my app back to running as it was before.
I think the problem was that my Mac was out of Disk Space, and when I tried to run, the AutoSave from Xcode failed to save. And for some reason the failure caused Xcode the delete the file when saving failed.
Learning from the lesson. I will do what folks here suggested from now on:
1) Time Machine
2) Git
3) Periodic zip the project and put on Dropbox and an external hard disk
4) Always ensure there's enough disk space
Thanks all. Hope nobody else would have to go through what I went through.
1) Are you using "Time Machine"? If not, consider this a wake-up call.
2) Use Spotlight (the magnifying glass in the upper right corner of your Macintosh menu) to find those missing files.
3) Once you do find them, delete the old files and re-add them to your project, making sure the "Target Membership" checkboxes are set.
Disk space warning is a good indication that things of this sort could happen. Some say you need to have %50 of the disk free. Whether it's true or not, filling the disk to the point system warning is a serious sign that you should free up enough space.
Sometimes a restart can magically 'find' a file, but I'm sure you tried that already. I'd try to find it in the project folder, or on the disk itself and not through XCode.
Most chances are the files are there, but XCode cannot see them for some reason.
Have you looked in the projects directory?
Also are you using source control (Locally or git) ?
I had the same problem, some of my views on the storyboard disappeared after Xcode crashed. After looking for a while for an answer I noticed the view still shows on the hierarchy panel. checking its properties I noticed that Xcode had changed my width and height properties to 0. Once I restored them, the view shows again. Long story short, check the properties, if the width and height are 0 the view becomes invisible.
I'm at a complete loss as to what I did to cause this:
For the second time since I started using XCode about a month ago (my first time seriously using it after taking one class several years ago) I try to run my project and the next thing I know I have errors because I have duplicate references. I looked at the project and it appeared that most of the files in my project had duplicated themselves, however I discovered that they are not duplicate files just duplicate references. This happened to me today when I tried to build on an actual iphone for the first time but it also happened to me a few weeks ago while using the simulator. Neither time do I recall doing anything unusual. I have built and tested the project probably 100+ times and normally all goes ok. I was able to fix it the first time but I think I have made it worse this time and am probably going to add the files back into a new project. My co-worker also mentioned this happening to him (he has about as much experience with xcode as I do). He told me he ended up with files nested in folders (groups?) nested in other folders about 20 deep.
My question is this: Does anyone know what I may have done to cause this. I would really like to avoid this problem in the future since it is proving to be quite a headache. Any advice would be greatly appreciated.
E.T.A. xcode version 4.6.2 (possibly an earlier version the first time it happened)
Try this instead:
Highlight all the duplicate files
Right click on one of the files and press "Delete"
When prompted for which delete option, click "Remove Reference"
Also you asked for "any advice".
If you aren't already using git source control in your Xcode projects, start now.
You can spot many mistakes like this earlier and fix them more easily using git.
When you add files as a copy, the Xcode project navigator shows added files with an A and modified files with an M.
If the file is inside a closed group folder, the folder shows an A.
If you add a reference without a copy the project navigator won't show an A but MyApp.xcodeproj will show M.
In Xcode you can discard a change before committing it.
In the case below, you would discard changes to all added or modified files.
Typically you review and commit changes frequently.
Using a gui tool such as SourceTree, you have a good chance of spotting an accidental change before you commit. For example, you can see changes to the project file.
If you accidentally commit an unintended change, you can go back later and reverse a commit.
By committing frequently, you have more control over which changes you undo and which ones you keep.
References:
http://www.raywenderlich.com/13771/how-to-use-git-source-control-with-xcode-in-ios-6
http://git-scm.com/doc (scroll down to see videos)
http://www.sourcetreeapp.com
http://gitimmersion.com
I had the same 20 deep nesting of my main folder of images. If its not a bug its very strange behaviour. I just backed it all up !! Then I opened the folder in finder, found the point at which it was starting to nest and deleted it.
I did a rebuild, but I don't think Xcode even noticed. It made no difference to the size of my app so Xcode was not putting unnecessary files in the binary.
This happened to me when I imported a file. Suddenly I had two nested directories containing what looked like copies of all my files. The compiler complained about duplicate classes.
I found a solution, but it's a ball-ache and a time sink.
1: Click on your project in the navigator to open up the project settings in the main view.
2: Open the 'Compile Sources' accordion entry.
(This allows you to see which files are being used in the compilation process.)
3: Find any duplicates in here and delete them.
(At this stage your project should compile again.)
4: In your navigator view, slow-double-click one of the files that's duplicated there. This should allow you to rename it. Change the name (not the extension) slightly.
5: You should notice that the copy becomes red. Select it and hit delete.
(This avoids the delete operation removing the file from the 'Compile Sources')
6: Rename the original file back to its original name again.
7: Repeat from 4 until done, or until bored.
8: Explain to your boss why a simple copy change took half a day.
This process can be optimised up by first renaming all duplicated files, then deleting the duplicates all at once. However this means that you can't test for successful compilation between steps, which allows you to narrow the culprit down to a single file. And takes even more time.
If compilation fails, ensure all the files you need are still in the 'Compile Sources' section, as this process can cause them to be lost from there. The compiler will normally give some reasonable errors about missing classes and variables, but a missing AppDelegate will produce a more confusing error.
I downloaded a project made with Delphi 2009,which is also what I use,however there is one breakpoint that I just can't remove.If I try to remove it,its being executed again after the program is executed.
I met such things in other debuggers known as Hardware breakpoints,but this is not important.How do I remove the breakpoint?
EDIT: Article about those breakpoints,but It doesn't explain how to remove them.
If, for whatever reason, you can't turn these off in the IDE, as Rob says, this is persisted in the .dsk file.
You don't have to delete the file (and all of your other settings), though. you can just open it up in a text editor and find and edit the following section:
[Breakpoints]
View->Debug Windows->Breakpoints.
I'm very dissapointed at those articles.They explain how to add something,but not how to remove it.
Breakpoints are stored in the dsk file for your project. Close your project, delete that file, and re-open the project. All breakpoints should be gone. (Other window-layout customizations will be gone, too. You'll have to restore those preferences manually.)