mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 06:18:21 +02:00
DBG: add option to reset debugger after each run
git-svn-id: trunk@34925 -
This commit is contained in:
parent
ed35731fe8
commit
34c3888d83
@ -6411,6 +6411,7 @@ begin
|
||||
end;
|
||||
|
||||
FFileName := AValue;
|
||||
// TODO: Why?
|
||||
if (FFilename <> '') and (FState = dsIdle) and ChangeFileName
|
||||
then SetState(dsStop);
|
||||
end;
|
||||
|
@ -131,6 +131,7 @@ inherited DebuggerGeneralOptionsFrame: TDebuggerGeneralOptionsFrame
|
||||
Width = 519
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoFill = True
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Debugger general options'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
|
@ -155,6 +155,7 @@ procedure TDebuggerGeneralOptionsFrame.FetchDebuggerGeneralOptions;
|
||||
begin
|
||||
// IMPORTANT if more items are added the indexes must be updated here!
|
||||
gcbDebuggerGeneralOptions.Checked[0] := EnvironmentOptions.DebuggerShowStopMessage;
|
||||
gcbDebuggerGeneralOptions.Checked[1] := EnvironmentOptions.DebuggerResetAfterRun;
|
||||
end;
|
||||
|
||||
procedure TDebuggerGeneralOptionsFrame.FetchDebuggerSpecificOptions;
|
||||
@ -310,6 +311,7 @@ begin
|
||||
gbAdditionalSearchPath.Caption := lisDebugOptionsFrmAdditionalSearchPath;
|
||||
gcbDebuggerGeneralOptions.Caption := lisDebugOptionsFrmDebuggerGeneralOptions;
|
||||
gcbDebuggerGeneralOptions.Items.Add(lisDebugOptionsFrmShowMessageOnStop);
|
||||
gcbDebuggerGeneralOptions.Items.Add(lisDebugOptionsFrmResetDebuggerOnEachRun);
|
||||
gbDebuggerSpecific.Caption := lisDebugOptionsFrmDebuggerSpecific;
|
||||
end;
|
||||
|
||||
@ -337,6 +339,7 @@ begin
|
||||
DebuggerSearchPath := TrimSearchPath(txtAdditionalPath.Text,'');
|
||||
// IMPORTANT if more items are added the indexes must be updated here!
|
||||
DebuggerShowStopMessage := gcbDebuggerGeneralOptions.Checked[0];
|
||||
DebuggerResetAfterRun := gcbDebuggerGeneralOptions.Checked[1];
|
||||
|
||||
for i := 0 to FCurrentDebPropertiesList.Count - 1 do
|
||||
SaveDebuggerProperties(FCurrentDebPropertiesList[i],
|
||||
|
@ -1156,6 +1156,7 @@ begin
|
||||
FDebugger.ErrorStateInfo, ftError, [frStop]);
|
||||
end;
|
||||
dsStop: begin
|
||||
// TODO: TDebugger.SetFileName sets dsStop during startup (leading to OldState=dsIdle)
|
||||
FPrevShownWindow:=0;
|
||||
if (OldState<>dsIdle)
|
||||
then begin
|
||||
@ -1168,7 +1169,11 @@ begin
|
||||
if MsgResult=mrYesToAll then
|
||||
EnvironmentOptions.DebuggerShowStopMessage:=false;
|
||||
end;
|
||||
FDebugger.FileName := '';
|
||||
|
||||
if EnvironmentOptions.DebuggerResetAfterRun then
|
||||
ResetDebugger
|
||||
else
|
||||
FDebugger.FileName := '';
|
||||
|
||||
if FDialogs[ddtAssembler] <> nil
|
||||
then TAssemblerDlg(FDialogs[ddtAssembler]).SetLocation(nil, 0);
|
||||
|
@ -175,6 +175,7 @@ type
|
||||
|
||||
TEnvironmentOptions = class(TAbstractIDEEnvironmentOptions)
|
||||
private
|
||||
FDebuggerResetAfterRun: boolean;
|
||||
FFilename: string;
|
||||
FFileAge: longint;
|
||||
FFileHasChangedOnDisk: boolean;
|
||||
@ -481,6 +482,8 @@ type
|
||||
write SetDebuggerSearchPath;
|
||||
property DebuggerShowStopMessage: boolean read FDebuggerShowStopMessage
|
||||
write FDebuggerShowStopMessage;
|
||||
property DebuggerResetAfterRun: boolean read FDebuggerResetAfterRun
|
||||
write FDebuggerResetAfterRun;
|
||||
property ShowCompileDialog: boolean read FShowCompileDialog
|
||||
write FShowCompileDialog;
|
||||
property AutoCloseCompileDialog: boolean read FAutoCloseCompileDialog
|
||||
@ -1134,6 +1137,8 @@ begin
|
||||
// Debugger General Options
|
||||
DebuggerShowStopMessage:=XMLConfig.GetValue(
|
||||
Path+'DebuggerOptions/ShowStopMessage/Value', True);
|
||||
DebuggerResetAfterRun :=XMLConfig.GetValue(
|
||||
Path+'DebuggerOptions/DebuggerResetAfterRun/Value', False);
|
||||
FDebuggerEventLogClearOnRun := XMLConfig.GetValue(
|
||||
Path+'Debugger/EventLogClearOnRun', True);
|
||||
FDebuggerEventLogCheckLineLimit := XMLConfig.GetValue(
|
||||
@ -1464,6 +1469,8 @@ begin
|
||||
FDebuggerFilename,'');
|
||||
XMLConfig.SetDeleteValue(Path+'DebuggerOptions/ShowStopMessage/Value',
|
||||
FDebuggerShowStopMessage, True);
|
||||
XMLConfig.SetDeleteValue(Path+'DebuggerOptions/DebuggerResetAfterRun/Value',
|
||||
FDebuggerResetAfterRun, False);
|
||||
SaveRecentList(XMLConfig,FDebuggerFileHistory,
|
||||
Path+'DebuggerFilename/History/');
|
||||
XMLConfig.SetDeleteValue(Path+'DebuggerSearchPath/Value',
|
||||
|
@ -4534,6 +4534,7 @@ resourcestring
|
||||
lisDebugOptionsFrmAdditionalSearchPath = 'Additional search path';
|
||||
lisDebugOptionsFrmDebuggerGeneralOptions = 'Debugger general options';
|
||||
lisDebugOptionsFrmShowMessageOnStop = 'Show message on stop';
|
||||
lisDebugOptionsFrmResetDebuggerOnEachRun = 'Reset Debugger after each run';
|
||||
lisDebugOptionsFrmDebuggerSpecific = 'Debugger specific options (depends on '
|
||||
+'type of debugger)';
|
||||
lisDebugOptionsFrmEventLog = 'Event Log';
|
||||
|
Loading…
Reference in New Issue
Block a user