[Lazarus] This is how you can fix that annoying bug with Build All asking to reset the debugger then aborting.

Martin lazarus at mfriebe.de
Sun Dec 26 13:42:29 CET 2010


On 26/12/2010 13:28, Juha Manninen wrote:
> Peter Williams kirjoitti sunnuntai 26 joulukuu 2010 05:14:20:
>    
>> Mattias,
>> This is how you can fix that annoying bug with Build All asking to reset
>> the debugger then aborting. When you do a Build All
>> you will get:
>> ConfirmationDo you want to rebuild lazarus with profile: Build All[yes]
>> [no] Selecting yes gives
>> Some message that I cannot find about the debugger needs to be reset.
>> Please change your code so that
>> if DebugProcessRunning then   Reset;BuildAll;
>> I cannot find this in your code and obviously you know your way around the
>> code better than I. Regards,    PEWPeter Eric Williams
>>      
> You should make a bug report with steps to reproduce.
> In my opinion it is ok to have a confirmation while debugging and then clicking
> "Build All".
>    

Until very recently it was impossible to stop or reset the debugger, in 
order to build anything (build \lazarus, or build a project)

Calling Debugger.Stop only scheduled a signal, and that would only be 
processed after the current event did finish. So it was needed to exit 
the current Menu.OnClick handler, or the debugger would not stop.

This has partly been solved, in most cases the debugger can now be 
stopped. But not always.

Technical background:
While debugging, all other code runs in a ProcessMessages called from 
the debugger.
Only if this returns thye debugger react's to any commands received 
(they are all queued).
Doing
   Debugger.Stop
   App.ProcessMessages
does *not* help either.


Martin




More information about the Lazarus mailing list