On Jun 9, 2005, at 9:21 PM, Alexey Proskuryakov wrote: However, when it comes to debugging this file, the breakpoints act like they have drifted about 3 lines downwards. I get stopped on lines where there is no breakpoint, and on the lines I DID put a breakpoint, I don't get stopped.
I often get the same behavior with files that have Mac line endings (Xcode 2.0).
Can anyone tell me how to fix this? I know I can report it via Apple's bug support system, but I'd really rather fix this debugger problem today rather than next week.
IMHO, it's mostly a generic Cocoa bug (rdar://4055779) - it appears to have problems with line endings other than LF. But I'd still file a report against Xcode if I saw this problem in 2.1 (haven't installed it yet).
There are a variety of contributing causes to the editor and the breakpoints getting out of synch in Xcode 2.0 and earlier. We tried to address as many of them as we could find (mixed line endings, block comments > 128 characters, to name a few) in Xcode 2.1. If you have a reproduceable case, and you can distill it down to a small test project, please send us the project attached to a Radar bug.
Alexey could be right that if you have an otherwise carriage-return-delimited file and there are three lines that have an extra linefeed after the carriage return, different text systems may disagree about how many lines there are (because some will count CRLF as one line, others as two).
If you are still seeing this in Xcode 2.1, please file a bug, and include the text file in which it's happening.
Chris
|