3

I'm having trouble running debug in a Firemonkey application in Delphi 10.2 Tokyo (Windows 10). Lines that should normally accept breakpoint are simply ignored by the compiler as shown in the image (green line). I couldn't find a way to simulate this. Apparently the problem occurs only in this project. Has anyone seen this happen?

enter image description here

EDITED: There are two lines inside a same begin ... end;. One of them allows the breakpoint to be added and the previous line does not allow it. Notice that in the image there are two begin ... end; presenting the same problem and all are part of the same case..of. So the breakpoints are active in the project, but they do not work correctly. The event where the code is always being called.

wBB
  • 821
  • 1
  • 18
  • 39
  • @KenWhite, the question is not duplicated because you can notice that in this case the line just below the other one that is green allows the breakpoint, even though the two are inside the same `begin ... end;`. I updated the image to show that it has more than one place where it does not have the blue dot that allows marking the line with breakpoint. – wBB Nov 18 '18 at 03:38
  • 2
    What you say about being able to put a breakpoint on one like but not the previous one can be a sign that the source code is out of sync with the app's debug info. If doing a `Build all` does not fix this, try putting an ! in the code and recompiling. If the compiler doesn't complain about the !, the source file you're looking at in the IDE isn't the one that you r app is actually using. – MartynA Nov 18 '18 at 09:54
  • 1
    I added one [more case](https://stackoverflow.com/a/53360447/2292722) as an answer to the first listed duplicate above. It explains the effect of various EOL characters (and combinations) and why one in particular may offset the breakpoint markers from the source lines. At the end of my post is the simple correction you can do to the file, if this is the reason. – Tom Brunberg Nov 18 '18 at 11:46
  • @MartynA, great tip for us to know if there really is a problem. Unfortunately the compiler detected `!`. Thank you! – wBB Nov 18 '18 at 12:13
  • @TomBrunberg, thank you once again for the help. Your tip helped me solve the problem. It was another character at the end of the line, different from `CRLF` or `CR` or `LF`. If you prefer, post your answer so I can mark it as correct. I just can't understand why some users keep insisting on marking issues as duplicates before even trying to understand the problem... Thank you!!!! – wBB Nov 18 '18 at 12:13
  • Glad I could help! As this q is marked as a duplicate, I can not answer here. You can upvote my answer there if you like. – Tom Brunberg Nov 18 '18 at 12:21
  • Upvote done. Thanks! – wBB Nov 18 '18 at 12:36
  • Thank you! Would you mind telling what exactly turned up to be the offending character(s) in your case? – Tom Brunberg Nov 18 '18 at 12:46
  • Sorry...I didn't see which character number, but its symbol in the Delphi editor was different from those in your answer. What I noticed in several lines of my code was the existence of `CR` alone, just like you said it generates errors. Except that these errors, in my case, appeared many lines down the code. I believe these `CR`s alone came from code copied from Visual Studio Code. – wBB Nov 18 '18 at 23:57

0 Answers0