There are a number of reasons Delphi's debugger might fail to stop at a breakpoint you set. I've seen this issue mentioned time and again on the public newsgroups and I thought it might be worth posting a quick list off the top of my head:
- The .pas file you're debugging has is missing line feeds. Be sure that your file has correct CRLF characters at the end of each line.
- You have compiler optimizations turned on. Occaisonally, compiler optimizations may cause your code to execute in an unexpected order. Be sure to turn optimizations off and stack frames on.
- You're looking at a source file that's not actually compiled/linked into the active project. This can happen as a result of copying a file from one directory to another and your project desktop reopens the file from the old location. One quick way to tell is add a syntax error and compile the code, if it doesn't stop on the error then you're looking at the wrong file.
- You turned off Debug Information and Local symbols options. Of course, these are a lot less likely but still possible.
Ok, that's all for now. Let me know if you think of anything else and I'll update the list.