Recent

Author Topic: Debugging: 'continue' in the ide?  (Read 1727 times)

Mario

  • New Member
  • *
  • Posts: 30
Debugging: 'continue' in the ide?
« on: July 20, 2024, 10:45:24 am »
Hi,

I am wondering where you can find the 'continue' functionality in the debugger. You know, you set a couple of break points, and when you hit one, you inspect the situation and, in other IDEs (Eclipse, VS, VS code, etc) there's this 'continue' button which makes the program run freely until it hits the next breakpoint (or exception, etc.).

How do I do this in the Lazarus IDE? (I am Running Lazarus compiled from git sources checked out today).

Thanks!

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Debugging: 'continue' in the ide?
« Reply #1 on: July 20, 2024, 10:47:51 am »
F9

Menu: Run > Run

Toolbar: Green arrow.

Mario

  • New Member
  • *
  • Posts: 30
Re: Debugging: 'continue' in the ide?
« Reply #2 on: July 20, 2024, 10:54:38 am »
LOL Ok thanks.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8035
Re: Debugging: 'continue' in the ide?
« Reply #3 on: July 20, 2024, 11:26:30 pm »
F9

Menu: Run > Run

Toolbar: Green arrow.

Martin, could the hint text be tweaked to show "Continue" in this case, or could it always show "Run/Continue"?

I'm a big fan of the classical Windows UI which- in practical terms- came in with Windows '95, and the... intentions shown by menu item names and dynamic hints (both of which are very much ignored by Android) are an important part.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Zoran

  • Hero Member
  • *****
  • Posts: 1882
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Debugging: 'continue' in the ide?
« Reply #4 on: July 20, 2024, 11:55:28 pm »
"Run" seems the natural choice to me... It's just a quite subjective personal opinion, though.
Probably because Delphi also used "run" for this. I haven't used Delphi versions newer than twenty years, though.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8035
Re: Debugging: 'continue' in the ide?
« Reply #5 on: July 20, 2024, 11:59:35 pm »
I broadly agree, but "Run" can be interpreted as "Start over" when in fact the user needs the reassurance that his state is not about to be lost.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Zoran

  • Hero Member
  • *****
  • Posts: 1882
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Debugging: 'continue' in the ide?
« Reply #6 on: July 21, 2024, 12:41:14 am »
I broadly agree, but "Run" can be interpreted as "Start over" when in fact the user needs the reassurance that his state is not about to be lost.

MarkMLl

You are right that it could be interpreted so. I'm just very used to using "run" to continue program execution in debugging, as It's always been so, first in Delphi then in Lazarus.
So yes, if other popular IDE-s have some separate "continue" button, it might be confusing for new Lazarus users who have experience with these IDE-s.

Mario

  • New Member
  • *
  • Posts: 30
Re: Debugging: 'continue' in the ide?
« Reply #7 on: July 22, 2024, 08:37:29 am »
Lazarus is the first IDE I have used that doesn't have a separate continue button. A 'restart' button would also be nice  :)

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1224
Re: Debugging: 'continue' in the ide?
« Reply #8 on: July 22, 2024, 08:46:15 am »
Quote
I broadly agree, but "Run" can be interpreted as "Start over" when in fact the user needs the reassurance that his state is not about to be lost..
it’s obvious that it doesn’t mean start over because the stop option is enabled.

Lazarus is the first IDE I have used that doesn't have a separate continue button. A 'restart' button would also be nice  :)

How long have you used Lazarus?
« Last Edit: July 22, 2024, 08:52:37 am by Joanna »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Debugging: 'continue' in the ide?
« Reply #9 on: July 22, 2024, 10:44:09 am »
Lazarus is the first IDE I have used that doesn't have a separate continue button. A 'restart' button would also be nice  :)

I have never paid much attention to it. I just checked with VS, and indeed it renames the button.
In our case that would just be the hint (since the button does not show text), and the menu entry. At least I guess that would be it.

I don't mind it being changed. But I don't know when I would get to it. So it can be reported as a feature request.


I don't think we need a restart button. Stop + run is really easy to hit. And there are keys for it too.
(Unless you made changes to the code, and you want "restart" to re-run the unchanged exe / without recompiling)?

cdbc

  • Hero Member
  • *****
  • Posts: 1666
    • http://www.cdbc.dk
Re: Debugging: 'continue' in the ide?
« Reply #10 on: July 22, 2024, 11:57:49 am »
Hi
From Martin_fr:
Quote
I don't think we need a restart button. Stop + run is really easy to hit. And there are keys for it too.
+1
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

440bx

  • Hero Member
  • *****
  • Posts: 4739
Re: Debugging: 'continue' in the ide?
« Reply #11 on: July 22, 2024, 12:15:40 pm »
As someone who still routinely uses VS, I cannot think of the last time I used the restart button and, as far as the "continue" goes, I find it ambiguous, "continue" what ? ... is it single step ? ... is it till the function ends ?... something else ?

I find "run" to be much clearer.  what does "run" mean ?... easy... run the program... doh!

One of the reasons VS needs these ambiguous buttons is because if you have edit and continue, (look... "continue" is there) then if you edit the source it will do a partial compile and patch the original binary then you can "continue" debugging (which it does automatically anyway if you press F10 or F11.)

Lazarus doesn't support that and, while, at one time, I thought "edit and continue" was a neat feature, I now much prefer being able to add to existing code while debugging it and having the IDE keep track of the lines that have been added (something VS cannot do.)

In some ways, the Lazarus debugging environment is now _superior_ to what VS provides.  Considering that the debugger is one of the most convenient and powerful features of VS, that's quite a feat the Lazarus FpDebug developers have managed.

Lazarus/FpDebug does not need a "continue" since it does not and cannot mean the same as in VS (because "edit and continue" are not supported and, again, for the record, I strongly prefer FpDebug behavior over VS' in that regard.)

IMO, the way Lazarus currently has it is "right on the money".

My $0.02

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

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Debugging: 'continue' in the ide?
« Reply #12 on: July 22, 2024, 01:11:21 pm »
As someone who still routinely uses VS, I cannot think of the last time I used the restart button and, as far as the "continue" goes, I find it ambiguous, "continue" what ? ... is it single step ? ... is it till the function ends ?... something else ?

I find "run" to be much clearer.  what does "run" mean ?... easy... run the program... doh!

Well, we could make "run" more verbose in all cases.

We already have "run" vs "run without debugger".
Or depending on build mode: "run" vs "run with debugger".

Which mean that "run" (while not paused in debugger) is always the opposite of the other entry.

Background: if you are in release mode, and have no debug info, then you 99.9% don't want to run the app in the debugger (especially since currently that would ask you to enable debug info). So in "release mode", "run" will not use the debugger. ("run with debugger" will then work, with other debug backends).
Actually "release mode"..., Project options have a checkbox that indicates what run should do.

Now there the default-"Run" could then also have the verbose wording... But IMHO, it is much easier to identify, if it is just "Run" (and does what you most likely wanted to do)

As for "Continue", it could be "Continue running".
(But then "Single step" doesn't say "Continue a single step".)


In the end, each IDE has difference in their user interface. That also includes controlling the debugger.

IMHO the aim should be to offer as many of the features that are available, we don't always need to mimic how to access the feature. (So long as our method can be used with a similar amount of steps, or a lesser amount).

We already go a really far way by offering complete config of all key combos. So any user can set up the same keys that they use in whatever other IDE they use. (As long as the features do the same thing)

cdbc

  • Hero Member
  • *****
  • Posts: 1666
    • http://www.cdbc.dk
Re: Debugging: 'continue' in the ide?
« Reply #13 on: July 22, 2024, 04:23:28 pm »
Hi
Hmmm... How about the backwards compatibility with all of us old-timers with Lazarus?!? (Sorry guys, but a lot of us are not among the youngest anymore ~ 50+)
I, for one, don't *need* any change.
Just my 2 cents worth...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

 

TinyPortal © 2005-2018