<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi Juha,<br><br>> Date: Sun, 26 Dec 2010 13:42:29 +0100<br>> From: lazarus@mfriebe.de<br>> To: lazarus@lists.lazarus.freepascal.org<br>> Subject: Re: [Lazarus] This is how you can fix that annoying bug with Build All asking to reset the debugger then aborting.<br>> <br>> On 26/12/2010 13:28, Juha Manninen wrote:<br>> > Peter Williams kirjoitti sunnuntai 26 joulukuu 2010 05:14:20:<br>> >    <br>> >> Mattias,<br>> >> This is how you can fix that annoying bug with Build All asking to reset<br>> >> the debugger then aborting. When you do a Build All<br>> >> you will get:<br>> >> ConfirmationDo you want to rebuild lazarus with profile: Build All[yes]<br>> >> [no] Selecting yes gives<br>> >> Some message that I cannot find about the debugger needs to be reset.<br>> >> Please change your code so that<br>> >> if DebugProcessRunning then   Reset;BuildAll;<br>> >> I cannot find this in your code and obviously you know your way around the<br>> >> code better than I. Regards,    PEWPeter Eric Williams<br>> >>      <br>> > You should make a bug report with steps to reproduce.<br>> > In my opinion it is ok to have a confirmation while debugging and then clicking<br>> > "Build All".<br>> >    <br>> <br>> Until very recently it was impossible to stop or reset the debugger, in <br>> order to build anything (build \lazarus, or build a project)<br>> <br>> Calling Debugger.Stop only scheduled a signal, and that would only be <br>> processed after the current event did finish. So it was needed to exit <br>> the current Menu.OnClick handler, or the debugger would not stop.<br>> <br>> This has partly been solved, in most cases the debugger can now be <br>> stopped. But not always.<br><br>I looked at the Windows code about 4-5 days ago.<br><br>> <br>> Technical background:<br>> While debugging, all other code runs in a ProcessMessages called from <br>> the debugger.<br>> Only if this returns thye debugger react's to any commands received <br>> (they are all queued).<br>> Doing<br>>    Debugger.Stop<br>>    App.ProcessMessages<br>> does *not* help either.<br><br><font style="font-size: 16pt;" size="4">I suggest calling Debugger.Reset</font><font style="font-size: 16pt;" size="4"><br></font><font style="font-size: 16pt;" size="4"><br></font><font style="font-size: 16pt;" size="4">maybe also a App.ProcessMessages but I am ignorant about how this works.</font><font style="font-size: 16pt;" size="4"><br></font><br>> <br>> <br>> Martin<br>> <br><br>PEW<br><br>> --<br>> _______________________________________________<br>> Lazarus mailing list<br>> Lazarus@lists.lazarus.freepascal.org<br>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus<br>                                      </body>
</html>