* * *

Author Topic: Auto stop before running?  (Read 989 times)

Trenatos

  • Sr. Member
  • ****
  • Posts: 442
  • Software developer - Open source contributor
    • MarcusFernstrom.com
Auto stop before running?
« on: February 22, 2018, 11:42:43 pm »
I'm trying to figure out if there's a way to make Lazarus stop any running process and re-launch rather than having to press the stop button or keyboard shortcut.

Right now: Press run. Make change. Press stop. Press run.

Wanted: Press run. Make change. Press run.

Does anyone know of a setting or way to make this happen?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4818
    • wiki
Re: Auto stop before running?
« Reply #1 on: February 23, 2018, 12:06:01 am »
There is no such setting.

If a person makes changes to the source while debugging, it is not necessary always the case that the person wants to restart the process.

I have often had that, when it takes a lot of steps to navigate the app to a problematic bit of code. Then when I made one change (could be a comment to an unrelated issue), I still want to continue, and see how the rest works, before I restart.

But what you can do is record an editor macro. ctrl-F2, then F9
Assign it to a new key. You can't use F9, because it will always stop, even if nothing was edited. You still may need F9 to run to the next breakpoint.
http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Macros

Trenatos

  • Sr. Member
  • ****
  • Posts: 442
  • Software developer - Open source contributor
    • MarcusFernstrom.com
Re: Auto stop before running?
« Reply #2 on: February 23, 2018, 12:34:39 am »
I don't want it to stop when a change is made, just so that when I hit Run, if it's already running it should stop the process and then run it.

Right now I've mapped start to Command + r and stop to Command + Shift + R.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4818
    • wiki
Re: Auto stop before running?
« Reply #3 on: February 23, 2018, 01:21:16 am »
Well you can map both to just one key. See macros.

Trenatos

  • Sr. Member
  • ****
  • Posts: 442
  • Software developer - Open source contributor
    • MarcusFernstrom.com
Re: Auto stop before running?
« Reply #4 on: February 23, 2018, 03:13:59 pm »
I'll take a look at that, thanks Martin

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus