Search code examples
delphidebuggingbreakpointsdelphi-2007

Why does the break point not disappear when removed


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 ?


Solution

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