Constant breakpoints? How to remove them? - delphi

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.)

Related

Xcode won't pause at this breakpoint because it has not been resolved

Shortly after updating to Xcode 13.2.1 I started seeing some weird behaviour of breakpoints. When I run an app (in a simulator) some of my breakpoints change their look and turn to dotted blue outlined. Xcode does not stop execution at these breakpoints although code has been compiled, loaded and executed. I checked it in Console by adding some prints.
When I hover over breakpoint Xcode shows a message:
Xcode won't pause at this breakpoint because it has not been resolved
Resolving it requires that:
The line at the breakpoint is compiled.
The compiler generates debug information that is not stripped out (check the Build Settings).
The library for the breakpoint is loaded.
All trivial solutions like reloading, reapplying breakpoints have not helped.
Did anybody else see something like this? Is there a way to solve it?
Screenshot for reference:
Ok, so in my particular case rebooting laptop has helped. All breakpoints are now good. But it would still be nice to know the cause of the problem.
Make sure that the file in which you are adding breakpoint is having correct target set in target membership.
Click on .m file in which you want to add breakpoint.
Select the file inspector.
Check if you have selected correct target for that file or not (check below image).
What worked for me, was to select the files, delete them with - Delete>Move To Trash - and then drag the files back from the trash to the project.
In my case the issue was happening, because class was not added to the target, which I was trying to build.
For my case somehow the code path was never invoked and very likely considered as dead code. The same thing applies when not adding the file to the target that you want to debug.
This can be the case or somehow debugger might not be able to resolve your breakpoint. The first thing in this case should be cleaning derived data and any caches.
But instead of recloning your repo you can just delete breakpoint config from the location described in this answer
In Xcode 14 the problem is much more prevalent and "consistent". I figured out one pattern where it always fails and how to mitigate it.
If you have a final class then breakpoints set on or inside a private method will have that issue. If you remove private from the method or final from the class the breakpoints will get resolved properly.
If tried everything and nothing worked I suggest the following:
Reclone your repo
This is what worked for me.
I just passed through this problem and the solution for me was recreating the files.
Note: The ones I was trying to originally breakpoint on were copied from another project. When I created the new files, even though their Identity and Type looked just the same (target membership, encoding, paths), for some reason breakpoints started to work again.
Note 2: When copying and pasting code to your new files (if done manually), migrated breakpoints - created in the older file - will continue to fail. Only the ones created in this new file will work properly.
Hope it helps.
My case
Working on framework development. Framework is injected into the sample app for development/run purpose. Breakpoints inside the framework won't work.
Fix
Just removing xcframework in sample app and replacing with framework.
Reason
xcframework are precompiled outside of the app, so lib isn't compiled when project is built and that's why breakpoints doesn't work.
For me reboot the Xcode, and it works~

Compilation Error while editing the visual studio solution

I am editing a visual studio MVC Solution. I have edited all the files, assemblies and Project Name etc. But in the end, it is build successfully but when I am going to run this solution it shows an error like shows in the picture.
Actually, TestSolution was the name of my solution which I've changed with RealEstateErp.Now when I am going to search "Using TestSolution " , I don't find anything. Now, what should I do to overcome this problem? Any kind of help will be appreciated.
when they make drastic changes like the namespaces and dll names, the first thing people forget is to delete the old dlls.
I would start with that, make sure you delete everything in bin, obj and all temp files which reside in Windows\Microsoft.Net and then Framework and Framework 64.
Next, check your global.asax file, specifically the front end part. You get to it by right-clicking the global.asax file and selecting the "View markup" option, that one always has a reference to the old namespace and always gets missed.
Finally, make sure you delete all the using statements referring to the old namespace. You don't need those and they will cause a compilation error like the one you are seeing, because that particular namespace does not exist anymore.
Actually, It was on the Web. Config under View Folder.
I've Updated it with the latest solution name and now it works fine for me.
Could you do Ctrl+Shift+F and search your whole solution about Using TestSolution?
You probably will find the word left somewhere.

Notepad++ inserts text on enter

I may have accidentally turned on a weird setting within Notepad++. When I press enter after certain lines, it autofills strange text. Take a look.
Has anyone ever seen anything like this? Restarting notepad doesn't fix it. Any insight would be appreciated.
Thanks
This can be caused by the plugin NppCalc, when ActiveCalc is on.
You may have accidentally turned it on with Ctrl-Shift-C if that is still assigned to ActiveCalc.
Turning ActiveCalc off (either with Ctrl-Shift-C again or by unchecking Plugins -> NppCalc -> Active Calc) should solve the problem.
I'd reset the configuration, or take a look at it manually.
It should be under:
%APPDATA%\Notepad++
You could copy the folder so you have a backup, then move files one by one until you find out which file has the offending setting in it, then narrow it down from there.

xcode duplicates files in project

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.

Xcode 4.5 Automatically changing .xib files

Since I upgraded to Xcode 4.5 I've found that it's automatically removing a section of each xib file I visit. Here is the section:
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1536" key="NS.object.0"/>
</object>
I can almost live with this, but when I go visit the file again I find there are even more 'auto' changes. They are more varied and harder to characterize so I won't include examples unless I really need to.
I don't understand what's going on here. I'm looking for one of two answers:
Is there some way to disable this?
Why is this happening and is there some way to force Xcode to apply these changes to all xib files so I can be done with this?
I would feel a lot better if I just understood what the heck is going on and why.
From what I've seen of this, Xcode will automatically reformat nibs, adding/removing from the .xib files as needed. Nothing seems to be functionally different for my purposes when I've had this happen.
Just for SEO, I'll bring this up, as this is very relevant when tracking changes in version control, such as Git. Every time I open old .xib files in Xcode (I'm using 5.0), they are automatically changed and it shows up in my Git client's diff tool.
TRY THIS:
*(If you are not using Git or some version control, set up a repo for the project to test this.)
See if there are any remaining unmodified .xibs you can open without modifying them.
Select/View it, but don't change anything.
Now select/view a different file in the project navigator. If an "M" shows up next to the .xib, rebuild your project and verify that it's behavior is the same.
If you want to ignore these, for version control reasons, just be sure not to stage/commit them if you're not intentionally making any changes to them.
If you want to "undo" the automatically changed file(s):
Right click on the file in the project navigator.
Go to "Source Control" >>> "Discard Changes..."
OR, discard them via Git or your version control tool of choice.
there is a way to disable this, but it is not without its own problems (listed below). You can show the xib file in Finder, Get Info on the file, and then under General, select Locked.
Problem 1: If you use source control, like most people, you won't be able to checkout an earlier commit or reset your branch to an earlier commit, until you unlock all the files that will be changed by the operation.
Problem 2: Now, every time you view the file in IB, a popup slides down from the top of the xCode window, with the title
“MBPreDeliveryComplete.xib” is locked for editing and you may not be able to save your changes. Do you want to unlock it?
And this message:
“MBPreDeliveryComplete.xib” is currently locked because it is marked as ‘Locked’ in the Finder.
With buttons giving the option of unlocking or not unlocking the file. Of course you can elect not to unlock the file, unless you actually intend to make changes.

Resources