mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 14:29:07 +02:00
IdeDebugger: Breakpoint properties, check for valid group name
This commit is contained in:
parent
05db0c6c76
commit
02f62a1b49
@ -173,19 +173,22 @@ object BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
|
OnChange = cmbGroupEditingDone
|
||||||
|
OnEditingDone = cmbGroupEditingDone
|
||||||
|
OnExit = cmbGroupEditingDone
|
||||||
OnKeyPress = cmbGroupKeyPress
|
OnKeyPress = cmbGroupKeyPress
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
Text = 'cmbGroup'
|
Text = 'cmbGroup'
|
||||||
end
|
end
|
||||||
object gbActions: TGroupBox
|
object gbActions: TGroupBox
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = cmbGroup
|
AnchorSideTop.Control = lblBadGroupName
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 215
|
Height = 215
|
||||||
Top = 255
|
Top = 276
|
||||||
Width = 438
|
Width = 438
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -407,8 +410,8 @@ object BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = gbActions
|
AnchorSideTop.Control = gbActions
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 95
|
Height = 74
|
||||||
Top = 476
|
Top = 497
|
||||||
Width = 438
|
Width = 438
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
@ -609,4 +612,24 @@ object BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
Caption = 'chkEnabled'
|
Caption = 'chkEnabled'
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
end
|
end
|
||||||
|
object lblBadGroupName: TLabel
|
||||||
|
AnchorSideLeft.Control = cmbGroup
|
||||||
|
AnchorSideTop.Control = cmbGroup
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Owner
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 139
|
||||||
|
Height = 15
|
||||||
|
Top = 255
|
||||||
|
Width = 305
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Right = 6
|
||||||
|
BorderSpacing.Bottom = 6
|
||||||
|
Caption = 'lblBadGroupName'
|
||||||
|
Font.Color = clRed
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -46,6 +46,7 @@ type
|
|||||||
edtFilename: TEdit;
|
edtFilename: TEdit;
|
||||||
gbActions: TGroupBox;
|
gbActions: TGroupBox;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
|
lblBadGroupName: TLabel;
|
||||||
lblWatchKind: TLabel;
|
lblWatchKind: TLabel;
|
||||||
lblWatchScope: TLabel;
|
lblWatchScope: TLabel;
|
||||||
lblLogCallStackLimit: TLabel;
|
lblLogCallStackLimit: TLabel;
|
||||||
@ -75,6 +76,7 @@ type
|
|||||||
procedure chkEvalExpressionChange(Sender: TObject);
|
procedure chkEvalExpressionChange(Sender: TObject);
|
||||||
procedure chkLogCallStackChange(Sender: TObject);
|
procedure chkLogCallStackChange(Sender: TObject);
|
||||||
procedure chkLogMessageChange(Sender: TObject);
|
procedure chkLogMessageChange(Sender: TObject);
|
||||||
|
procedure cmbGroupEditingDone(Sender: TObject);
|
||||||
procedure cmbGroupKeyPress(Sender: TObject; var Key: char);
|
procedure cmbGroupKeyPress(Sender: TObject; var Key: char);
|
||||||
procedure edtDisableGroupsButtonClick(Sender: TObject);
|
procedure edtDisableGroupsButtonClick(Sender: TObject);
|
||||||
procedure edtEnableGroupsButtonClick(Sender: TObject);
|
procedure edtEnableGroupsButtonClick(Sender: TObject);
|
||||||
@ -128,6 +130,12 @@ begin
|
|||||||
edtLogMessage.Enabled := chkLogMessage.Checked;
|
edtLogMessage.Enabled := chkLogMessage.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TBreakPropertyDlg.cmbGroupEditingDone(Sender: TObject);
|
||||||
|
begin
|
||||||
|
lblBadGroupName.Visible := (cmbGroup.Text <> '') and (not TIDEBreakPointGroup.CheckName(cmbGroup.Text));
|
||||||
|
ButtonPanel.OKButton.Enabled := (cmbGroup.Text = '') or (TIDEBreakPointGroup.CheckName(cmbGroup.Text));
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TBreakPropertyDlg.cmbGroupKeyPress(Sender: TObject; var Key: char);
|
procedure TBreakPropertyDlg.cmbGroupKeyPress(Sender: TObject; var Key: char);
|
||||||
begin
|
begin
|
||||||
if Key = ';' then Key := #0;
|
if Key = ';' then Key := #0;
|
||||||
@ -212,6 +220,11 @@ var
|
|||||||
begin
|
begin
|
||||||
if FBreakpoint = nil then Exit;
|
if FBreakpoint = nil then Exit;
|
||||||
|
|
||||||
|
if (cmbGroup.Text <> '') and (not TIDEBreakPointGroup.CheckName(cmbGroup.Text)) then begin
|
||||||
|
MessageDlg(Caption, lisGroupNameInvalid, mtError, [mbOk], 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
EnableGroupList := TStringListUTF8Fast.Create;
|
EnableGroupList := TStringListUTF8Fast.Create;
|
||||||
DisableGroupList := TStringListUTF8Fast.Create;
|
DisableGroupList := TStringListUTF8Fast.Create;
|
||||||
|
|
||||||
@ -389,6 +402,8 @@ begin
|
|||||||
chkLogCallStack.Checked := bpaLogCallStack in Actions;
|
chkLogCallStack.Checked := bpaLogCallStack in Actions;
|
||||||
edtLogCallStack.Value := FBreakpoint.LogCallStackLimit;
|
edtLogCallStack.Value := FBreakpoint.LogCallStackLimit;
|
||||||
chkTakeSnap.Checked := bpaTakeSnapshot in Actions;
|
chkTakeSnap.Checked := bpaTakeSnapshot in Actions;
|
||||||
|
|
||||||
|
cmbGroupEditingDone(nil);
|
||||||
FUpdatingInfo := False;
|
FUpdatingInfo := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -437,6 +452,7 @@ begin
|
|||||||
lblAutoContinue.Caption := lisAutoContinueAfter;
|
lblAutoContinue.Caption := lisAutoContinueAfter;
|
||||||
lblMS.Caption := lisMS;
|
lblMS.Caption := lisMS;
|
||||||
lblGroup.Caption := lisGroup + ':';
|
lblGroup.Caption := lisGroup + ':';
|
||||||
|
lblBadGroupName.Caption := lisGroupNameInvalid;
|
||||||
gbActions.Caption := lisActions;
|
gbActions.Caption := lisActions;
|
||||||
chkActionBreak.Caption := lisBreak;
|
chkActionBreak.Caption := lisBreak;
|
||||||
chkEnableGroups.Caption := lisEnableGroups;
|
chkEnableGroups.Caption := lisEnableGroups;
|
||||||
|
Loading…
Reference in New Issue
Block a user