Recent

Author Topic: v4.0rc3 breakpoints  (Read 785 times)

440bx

  • Hero Member
  • *****
  • Posts: 5461
v4.0rc3 breakpoints
« on: May 05, 2025, 05:09:24 am »
Hello,

I don't know if what follows is the intended behavior but I believe it should be considered a bug.

In a program of your choice set 5 or more breakpoints (valid  breakpoints please.)  Bring up the "Breakpoints" window (Ctrl-Alt-B), in that window select the first 2 breakpoints and click on the "Delete all breakpoints" icon.

I expected the breakpoints that were _selected_ to be deleted but, it deleted _all_ the breakpoints  (selected and not.)  That was not a good surprise.

Anyway, I think the "Delete all breakpoints" icon should delete all the breakpoints _only_ if none are selected but, only those that are selected if any are selected.

Comments welcome.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 17158
  • Ceterum censeo Trump esse delendam
Re: v4.0rc3 breakpoints
« Reply #1 on: May 05, 2025, 05:58:33 am »
??? select a couple of break pointes, right click, delete, dialog(do you wish to delete all selected breakpoints?)
So I don't see the point. All means all, all selected means all selected. There is no light between them. So, no, that is not a bug but properly implemented.
Seems more an unexpected experience. Maybe the dialog needs a warning triangle instead of a question mark, though.... That would be a feature request and I would support that. It would make the dialog better.
« Last Edit: May 05, 2025, 06:03:15 am by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11342
  • Debugger - SynEdit - and more
    • wiki
Re: v4.0rc3 breakpoints
« Reply #2 on: May 05, 2025, 09:57:09 am »
Can't reproduce. Neither with 4.0 nor trunk.

440bx

  • Hero Member
  • *****
  • Posts: 5461
Re: v4.0rc3 breakpoints
« Reply #3 on: May 05, 2025, 11:47:20 am »
Can't reproduce. Neither with 4.0 nor trunk.
Maybe a snapshot will help.

The snapshot shows there are 6 breakpoints set in the source. 
In the "Breakpoints" window, 3 have been selected.
Clicking on the icon that has the little red X, causes all the breakpoints to be deleted, not just the 3 that are selected.

I think that when there are selected breakpoints the "all breakpoints" should be the "all selected breakpoints".

That said, it would be "nice" if the icon was for "delete selected breakpoints" instead of "Delete all breakpoints". 

While it did delete all the breakpoints, I believe it is more common to select some breakpoints to delete.  Making the icon's purpose to delete selected breakpoints instead of "all breakpoints" seem something that will likely be useful more often (in addition to prevent undesirable surprises.)


(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11342
  • Debugger - SynEdit - and more
    • wiki
Re: v4.0rc3 breakpoints
« Reply #4 on: May 05, 2025, 01:11:11 pm »
Clicking on the icon that has the little red X, causes all the breakpoints to be deleted, not just the 3 that are selected.

The red X is "delete all" (and says so in the confirmation dialog)

The red "-" is delete current or selected.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11342
  • Debugger - SynEdit - and more
    • wiki
Re: v4.0rc3 breakpoints
« Reply #5 on: May 05, 2025, 01:13:28 pm »
It used to be a "yellow brush" (cleaning up).

But there were complains that it wasn't recognisable.

The red X has a "list" icon behind it, to indicate "all". As well as it can be done for the size.

440bx

  • Hero Member
  • *****
  • Posts: 5461
Re: v4.0rc3 breakpoints
« Reply #6 on: May 05, 2025, 02:53:08 pm »
Clicking on the icon that has the little red X, causes all the breakpoints to be deleted, not just the 3 that are selected.

The red X is "delete all" (and says so in the confirmation dialog)

The red "-" is delete current or selected.
I know that strictly speaking what happens is correct but, in any other application the delete action applies to what is selected not to everything (particularly when something is selected.)

Like in an editor, if you want to delete all the lines, you first select all the lines then delete the selected lines.  I think it is counter-intuitive and against the norm to delete items that NOT selected.

But, I concede that the icon and the dialog did exactly what they said they were going to do.  I just think it is counter to what is reasonably expected, not to mention that it is much more common to delete a subset of the breakpoints than all of them and, if the programmer desires to delete all the breakpoints, it seems reasonable to select them all first, just as blocks of lines to be deleted in a text editor are selected first (the block of lines is created and then deleted.)


(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11342
  • Debugger - SynEdit - and more
    • wiki
Re: v4.0rc3 breakpoints
« Reply #7 on: May 05, 2025, 03:39:30 pm »
but, in any other application the delete action applies to what is selected not to everything (particularly when something is selected.)

Like in an editor, if you want to delete all the lines, you first select all the lines then delete the selected lines.  I think it is counter-intuitive and against the norm to delete items that NOT selected.

But, not if you have 2 separate actions
- delete
- delete all

then the latter has a clear defined target of its own.

Some lists in other apps work similar, like browser history, or downloaded files... You may be able to remove some items, but usually also have a "clear all" action.

Not sure how that might be further improved.
Not sure about others, but I sure as hell, regularly need the "delete all" for breakpoints and watches (and sometimes debug history).

Thaddy

  • Hero Member
  • *****
  • Posts: 17158
  • Ceterum censeo Trump esse delendam
Re: v4.0rc3 breakpoints
« Reply #8 on: May 06, 2025, 08:37:53 am »
That's what I wrote in the first place. all means all and there is the obvious option to just delete the selected breakpoints.

I thought everybody knew that.  :-\

(Nice background in the screenshot  O:-)  by accident  8) )
« Last Edit: May 06, 2025, 08:44:14 am by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018