[Lazarus] Issue 0019296, Launch many instances, and forget about them [Re: Run Without Debbuging Shift+Ctrl+F9]

Martin lazarus at mfriebe.de
Tue May 10 23:36:42 CEST 2011


http://bugs.freepascal.org/view.php?id=19296

On 05/05/2011 22:43, Flávio Etrusco wrote:
> Of course. It only that I often wanted this in lazarus when I needed
> several instances to run concurrently.
>
Since the discussion about the patch was started on the list, I decided 
to continue it here, rather than to move it to mantis.

I understand your requirement, but as indicated I (and apparently 
others) are not comfortable with the solution in your patch.

IMHO the following additions are acceptable (though I am open to arguments):

1) An build in "Run without debugger", that uses the current "no 
debugger class" (TProcessDebugger) to launch the app.
- This launches a single instance and keeps track of it (same as setting 
debugger to none) [1]
- It disables single step and other buttons ....

2) A solution similar to yours, I think is reasonable too.  But I would 
suggest it to be committed as an installable package, for those who need it.
- I do think such a package could be committed to the Lazarus svn and be 
distributed with Lazarus by default. But of course it can also go to CCR...

Launching the app into background (and then just forget about it), can 
have unexpected side-effects, that may confuse other users.
- Such as, if the app still runs, at least on windows compilation will 
fail, because the exe is locked
- Not even the stop button would work (couldn't because if many are 
launched, which one to stop)
   Though of course it was possible to add comfort functions and keep 
track of them

In that aspect your patch has a problem, even if done as package. It 
attempts to compile the app first (if changed).
So if one instance is launched, then any change is made, launching 
another instance is impossible, as compilation fails due to the locked 
exe (may work on none windows)

3)
Actually a 3rd solution would be possible, where the IDE would have a 
debug-window listing all launched instances. Then one could 
attach/detach the debugger to any of them.
That would be pretty cool, but is far more than a what your patch 
attempts to do. (And it is my opinion only, I do not know if the other 
developers would think of such a solution as proper)
It would have to be very carefully be considered how such a function 
should work (and maybe even than it was better an external package). And 
also I can see quite a few problems that would have to be solved to do 
this....

--------------
In any case, do you indent to make further change, like implementing it 
as external package (considering the issue with compiling before exec, 
and locked exe)?
Or do you have any other idea, you wish to discuss, ad of which you hope 
it may help to solve this?

Best Regards
Martin

[1] should that not currently behave as described, then it may have to 
be fixed







More information about the Lazarus mailing list