I'm in the debugger stepping thru a program. I change a line of code or add a few lines, sometimes I add a procedure or function.
I did see that. The question is which of those steps are really involved in triggering the issue.
I do a lot of editing during debugging (and occasionally have to answer that dialog). Though I mostly edit units without forms. But I never had the issue.
I do not think it is the "during debugging". Afaik there is nothing different during debugging, than when the debugger is off.
Though the "do you want to stop" may affect any work that is done at that time (since obviously code flow in the IDE is altered).
The only think I can think is happening there, is
- files will be saved (I think an unlikely candidate)
- "remove empty procedure" is executed if enabled
I do not have the latter enabled, so if that were involved, it would explain why I do not get this.
Not sure what else codetools (we are talking auto generated code) would do, that is affected by any of those things.
However codetool is easily affected by the sources themself. Any particular coding style can trigger a bug.
IIRC, if the getter/setter for a property is in a parent class, or has extra brackets, then it will be duplicated (but only if codecompletion is explicitly triggered)
Anyway any other source code in your units, that would seem totally normal, compiles fine and all, could be behind this.
Yet again, the strange part is, that normally if codetool gets upset, it will refuse to insert any code at all "the component editor ... error", or codecompletion errors.....
The problem is that you notice the error when you try to compile. But that does not say it was introduced at that time. It could have been introduced seconds after the previous compile, or any time inbetween.
Hence my idea to use the undo function, and see where in your editing flow the errors where created.
Its a long shot, but maybe it reveals something.