IDE, Debugger: Add "Enabled" to breakpoint properties dialog

This commit is contained in:
Martin 2023-07-13 18:23:55 +02:00
parent 188aae51fa
commit d80518932f
2 changed files with 148 additions and 127 deletions

View File

@ -16,15 +16,15 @@ object BreakPropertyDlg: TBreakPropertyDlg
Constraints.MinWidth = 450
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '2.1.0.0'
LCLVersion = '3.99.0.0'
object lblFileName: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = edtFilename
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 9
Width = 54
Height = 15
Top = 10
Width = 51
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Filename:'
@ -35,9 +35,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtLine
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 34
Width = 27
Height = 15
Top = 39
Width = 25
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Line:'
@ -48,9 +48,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtCondition
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 109
Width = 55
Height = 15
Top = 143
Width = 56
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Condition:'
@ -61,9 +61,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtCounter
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 137
Width = 49
Height = 15
Top = 172
Width = 50
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Hitcount:'
@ -74,9 +74,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = cmbGroup
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 190
Width = 38
Height = 15
Top = 230
Width = 36
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Group:'
@ -87,9 +87,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtAutocontinueMS
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 163
Width = 102
Height = 15
Top = 201
Width = 103
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Auto continue after'
@ -100,10 +100,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = lblAutoContinue
AnchorSideTop.Side = asrCenter
Left = 204
Height = 14
Top = 163
Width = 25
Left = 205
Height = 15
Top = 201
Width = 24
BorderSpacing.Left = 6
Caption = '(ms)'
ParentColor = False
@ -114,9 +114,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtCounter
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 138
Height = 20
Top = 160
Left = 139
Height = 23
Top = 197
Width = 60
BorderSpacing.Left = 24
BorderSpacing.Around = 6
@ -130,10 +130,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 138
Height = 20
Top = 134
Width = 306
Left = 139
Height = 23
Top = 168
Width = 305
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 24
BorderSpacing.Around = 6
@ -146,10 +146,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 138
Height = 20
Left = 139
Height = 23
Top = 6
Width = 306
Width = 305
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 24
BorderSpacing.Around = 6
@ -165,14 +165,14 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 138
Left = 139
Height = 23
Top = 186
Width = 306
Top = 226
Width = 305
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 24
BorderSpacing.Around = 6
ItemHeight = 14
ItemHeight = 15
OnKeyPress = cmbGroupKeyPress
TabOrder = 7
Text = 'cmbGroup'
@ -184,23 +184,23 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 195
Top = 215
Height = 215
Top = 255
Width = 438
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Actions'
ClientHeight = 177
ClientHeight = 195
ClientWidth = 434
TabOrder = 8
object chkActionBreak: TCheckBox
AnchorSideLeft.Control = gbActions
AnchorSideTop.Control = gbActions
Left = 6
Height = 18
Height = 19
Top = 6
Width = 53
Width = 47
BorderSpacing.Around = 6
Caption = 'Break'
TabOrder = 0
@ -210,9 +210,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtEnableGroups
AnchorSideTop.Side = asrCenter
Left = 6
Height = 18
Top = 31
Width = 94
Height = 19
Top = 33
Width = 89
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Enable goups'
@ -224,9 +224,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtDisableGroups
AnchorSideTop.Side = asrCenter
Left = 6
Height = 18
Top = 57
Width = 100
Height = 19
Top = 62
Width = 96
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Disable groups'
@ -240,10 +240,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = edtEvalExpression
AnchorSideRight.Side = asrBottom
Left = 130
Height = 20
Top = 30
Width = 298
Left = 124
Height = 23
Top = 31
Width = 304
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 20
BorderSpacing.Top = 6
@ -264,10 +264,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = edtEvalExpression
AnchorSideRight.Side = asrBottom
Left = 130
Height = 20
Top = 56
Width = 298
Left = 124
Height = 23
Top = 60
Width = 304
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 20
BorderSpacing.Top = 6
@ -286,9 +286,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtEvalExpression
AnchorSideTop.Side = asrCenter
Left = 6
Height = 18
Top = 83
Width = 104
Height = 19
Top = 91
Width = 98
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Eval expression'
@ -300,9 +300,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtLogMessage
AnchorSideTop.Side = asrCenter
Left = 6
Height = 18
Top = 109
Width = 93
Height = 19
Top = 120
Width = 87
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Log message'
@ -316,10 +316,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = gbActions
AnchorSideRight.Side = asrBottom
Left = 130
Height = 20
Top = 82
Width = 298
Left = 124
Height = 23
Top = 89
Width = 304
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 20
BorderSpacing.Top = 6
@ -335,10 +335,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = gbActions
AnchorSideRight.Side = asrBottom
Left = 130
Height = 20
Top = 108
Width = 298
Left = 124
Height = 23
Top = 118
Width = 304
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 20
BorderSpacing.Top = 6
@ -352,9 +352,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtLogCallStack
AnchorSideTop.Side = asrCenter
Left = 6
Height = 18
Top = 134
Width = 94
Height = 19
Top = 149
Width = 89
BorderSpacing.Left = 6
Caption = 'Log call stack'
OnChange = chkLogCallStackChange
@ -365,9 +365,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = edtLogMessage
AnchorSideTop.Side = asrBottom
Left = 130
Height = 19
Top = 134
Left = 124
Height = 23
Top = 147
Width = 50
BorderSpacing.Left = 20
BorderSpacing.Top = 6
@ -381,10 +381,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = edtLogCallStack
AnchorSideTop.Side = asrCenter
Left = 186
Height = 14
Top = 136
Width = 110
Left = 180
Height = 15
Top = 151
Width = 108
BorderSpacing.Left = 6
Caption = 'lblLogCallStackLimit'
ParentColor = False
@ -394,9 +394,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtLogCallStack
AnchorSideTop.Side = asrBottom
Left = 6
Height = 18
Top = 159
Width = 93
Height = 19
Top = 176
Width = 87
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'chkTakeSnap'
@ -407,8 +407,8 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = gbActions
AnchorSideTop.Side = asrBottom
Left = 6
Height = 155
Top = 416
Height = 95
Top = 476
Width = 438
Anchors = [akTop, akLeft, akRight, akBottom]
OKButton.Name = 'OKButton'
@ -429,18 +429,18 @@ object BreakPropertyDlg: TBreakPropertyDlg
object edtCondition: TComboBox
AnchorSideLeft.Control = lblAutoContinue
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = rgWatchScope
AnchorSideTop.Control = chkEnabled
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 138
Left = 139
Height = 23
Top = 105
Width = 306
Top = 139
Width = 305
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 24
BorderSpacing.Around = 6
ItemHeight = 14
ItemHeight = 15
TabOrder = 4
Text = 'edtCondition'
end
@ -450,9 +450,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = edtFilename
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 138
Height = 19
Top = 32
Left = 139
Height = 23
Top = 35
Width = 60
BorderSpacing.Left = 24
BorderSpacing.Around = 6
@ -466,10 +466,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 138
Height = 18
Top = 57
Width = 306
Left = 139
Height = 19
Top = 64
Width = 305
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Left = 24
@ -480,34 +480,34 @@ object BreakPropertyDlg: TBreakPropertyDlg
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 3
ClientHeight = 18
ClientWidth = 306
ClientHeight = 19
ClientWidth = 305
TabOrder = 2
Visible = False
object rbWrite: TRadioButton
Left = 6
Height = 18
Height = 19
Top = 0
Width = 59
Width = 57
Caption = 'rbWrite'
Checked = True
TabOrder = 0
TabStop = True
end
object rbRead: TRadioButton
Left = 68
Height = 18
Left = 66
Height = 19
Top = 0
Width = 59
Width = 55
BorderSpacing.Left = 3
Caption = 'rbRead'
TabOrder = 1
end
object rbReadWrite: TRadioButton
Left = 130
Height = 18
Left = 124
Height = 19
Top = 0
Width = 88
Width = 83
BorderSpacing.Left = 3
Caption = 'rbReadWrite'
TabOrder = 2
@ -520,10 +520,10 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 138
Height = 18
Top = 81
Width = 306
Left = 139
Height = 19
Top = 89
Width = 305
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Left = 24
@ -534,34 +534,34 @@ object BreakPropertyDlg: TBreakPropertyDlg
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 3
ClientHeight = 18
ClientWidth = 306
ClientHeight = 19
ClientWidth = 305
TabOrder = 3
Visible = False
object rbGlobal: TRadioButton
Left = 6
Height = 18
Height = 19
Top = 0
Width = 65
Width = 63
Caption = 'rbGlobal'
Checked = True
TabOrder = 0
TabStop = True
end
object rbLocal: TRadioButton
Left = 74
Height = 18
Left = 72
Height = 19
Top = 0
Width = 59
Width = 57
BorderSpacing.Left = 3
Caption = 'rbLocal'
TabOrder = 1
end
object Label1: TLabel
Left = 133
Height = 18
Left = 129
Height = 19
Top = 0
Width = 4
Width = 3
Caption = ' '
ParentColor = False
end
@ -571,9 +571,9 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = rgWatchKind
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 59
Width = 70
Height = 15
Top = 66
Width = 71
BorderSpacing.Left = 6
Caption = 'lblWatchKind'
ParentColor = False
@ -584,12 +584,29 @@ object BreakPropertyDlg: TBreakPropertyDlg
AnchorSideTop.Control = rgWatchScope
AnchorSideTop.Side = asrCenter
Left = 6
Height = 14
Top = 83
Width = 81
Height = 15
Top = 91
Width = 79
BorderSpacing.Left = 6
Caption = 'lblWatchScope'
ParentColor = False
Visible = False
end
object chkEnabled: TCheckBox
AnchorSideLeft.Control = lblAutoContinue
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = rgWatchScope
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 139
Height = 19
Top = 114
Width = 305
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkEnabled'
TabOrder = 10
end
end

View File

@ -26,6 +26,7 @@ type
TBreakPropertyDlg = class(TDebuggerDlg)
ButtonPanel: TButtonPanel;
chkEnabled: TCheckBox;
chkTakeSnap: TCheckBox;
chkLogCallStack: TCheckBox;
chkEnableGroups: TCheckBox;
@ -251,6 +252,7 @@ begin
FBreakpoint.SetWatch(edtFilename.Text, ws, wk);
end;
end;
FBreakpoint.Enabled := chkEnabled.Checked;
// expression
FBreakpoint.Expression := edtCondition.Text;
// hitcount
@ -349,6 +351,7 @@ begin
end;
// expression
edtCondition.Text := FBreakpoint.Expression;
chkEnabled.Checked := FBreakpoint.Enabled;
// hitcount
edtCounter.Text := IntToStr(FBreakpoint.BreakHitCount);
// auto continue
@ -428,6 +431,7 @@ begin
rbReadWrite.Caption := lisWatchKindReadWrite;
end;
end;
chkEnabled.Caption := lisBPSEnabled;
lblCondition.Caption := lisCondition + ':';
lblHitCount.Caption := lisHitCount + ':';
lblAutoContinue.Caption := lisAutoContinueAfter;