Willicious 8 Posted May 3, 2023 (edited) Hi all, I'm running RAD Studio 10.4 Version 27.0.40680.4203. I daren't update it in case I can no longer compile the project I'm working on after the update. Debugging breakpoints have always worked, but today for some reason they stopped working. Now, when I enter a breakpoint (red dot at the left of the line), the red dot gets a cross ('X') in the centre of it and the program doesn't break at the appropriate point when running in Debug mode. As far as I know, I haven't changed any project settings since being able to use breakpoints and now not being able to use them. Any ideas...? Apologies if I haven't provided any necessary information. Edited May 3, 2023 by Willicious Share this post Link to post
Willicious 8 Posted May 3, 2023 OK, figured it out. It seems that certain lines don't actually allow breakpoints. MODS: Happy for this topic to be deleted. Share this post Link to post
stijnsanders 35 Posted May 3, 2023 (edited) I still find it a valid question. I remember this time I had something similar and fixed it by deleting the project's dcu's, to have compile/build generate all new ones. I don't remember how many Delphi versions ago it was though... Edited May 3, 2023 by stijnsanders 1 Share this post Link to post
Willicious 8 Posted May 3, 2023 (edited) 2 hours ago, stijnsanders said: I still find it a valid question. I remember this time I had something similar and fixed it by deleting the project's dcu's, to have compile/build generate all new ones. I don't remember how many Delphi versions ago it was though... Yes, fair enough. If others can benefit from this post, then great 👍 Deleting the .dcu files didn't help, and this was indeed the info I was getting from various sources. So, I tried just applying breakpoints to a bunch of random lines to see if it was something to do with the lines I was choosing to add breakpoints to, and it turns out that was the problem. I didn't realise that breakpoints were so selective. Ideally, if the user has chosen a line incorrectly (say, a "begin" line), the IDE would just intelligently choose the next available line that can be a breakpoint (or something) rather than just fail without explanation. Edited May 3, 2023 by Willicious Share this post Link to post
Patrick PREMARTIN 69 Posted May 4, 2023 Sometimes the reason is simply to instructions in the code somewhere. For breakpoints the IDE needs only one instruction per line. They are side effects if it's not the case. If you have this problem on a unit, just try the Ctrl+D (code formater) and see what happens after. Share this post Link to post
programmerdelphi2k 237 Posted May 4, 2023 other: if the "breakpoint" is in line "NOT" used in any place, then is ignored! Share this post Link to post