Jump to content
Willicious

RAD Studio Breakpoints not working

Recommended Posts

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 by Willicious

Share this post


Link to post

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

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 by stijnsanders
  • Like 1

Share this post


Link to post
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 by Willicious

Share this post


Link to post

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×