Delphi XE - All blue dots are shifted with one line up

坚强是说给别人听的谎言 提交于 2020-01-07 07:49:13

问题


Since yesterday, all blue dots (compiled lines) in my source code are shifted with one line up. So, the first dot starts at 'var' instead of 'begin' and the last dot is one line before the last 'end' of a function.

I deleted all files (starting with DCUs) except DPR, PAS, DFM and DPRJ and recompiled. But the dots are still shifted. How can I fix this? It makes the step=by-step debugging almost impossible.


回答1:


It could be that the file is corrupted so that you don't have proper line end combination (#13#10) on one line. Is the "one line up error" throughout the file or does it start somewhere in the middle of the unit?

Beginning with Delphi 2007 (maybe already Delphi 2005) you can check the line ends in your code by enableing checkbox Show line breaks in Tools - Options - Editor options - Source options. The line breaks look like this:

As you can see, a CR on its own is not considered a line break and messes up the synchronization of the executable line dots




回答2:


Try closing Delphi then deleting all *.identcache files.

I have a batch file at the root of my Delphi projects directory that recursively deletes all identcache files.



来源:https://stackoverflow.com/questions/42991392/delphi-my-debugger-seems-to-be-out-of-sync-with-the-source-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!