Delphi XE2 : Off by 7-20 lines in debugger and compiler error line numbers also off by the same amount

前端 未结 3 1810
醉酒成梦
醉酒成梦 2021-02-19 10:21

I am having a problem with a large Delphi codebase where I work where as a side effect of porting from Delphi 2007 to XE2, we now encounter the following strange, related issues

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-19 11:12

    It definitely is connected to line endings as explained in previous posts. It is extremely hard to try to edit it away, since the Embarcadero editor tries to do magic of its own and preserves the line endings of the current section (or so it seems),

    Solution: Right click in the IDE editor window, select "Format Source" (Ctrl-D) and accept.

    This will fix all line endings and removes the problem (for me any way). As a by-product you will get correctly formatted source code :-)

提交回复
热议问题