mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 09:59:20 +02:00
debugger: save/load breakpoint log messages, log message on breakpoint hit
git-svn-id: trunk@30653 -
This commit is contained in:
parent
7223934312
commit
4ae562d3db
@ -170,8 +170,7 @@ end;
|
|||||||
function GetBreakPointActionsDescription(ABreakpoint: TBaseBreakpoint): string;
|
function GetBreakPointActionsDescription(ABreakpoint: TBaseBreakpoint): string;
|
||||||
const
|
const
|
||||||
DEBUG_ACTION: array[TIDEBreakPointAction] of ShortString =
|
DEBUG_ACTION: array[TIDEBreakPointAction] of ShortString =
|
||||||
(lisBreak, lisEnableGroup, lisDisableGroup);
|
(lisBreak, lisEnableGroup, lisDisableGroup, lisLogMessage);
|
||||||
|
|
||||||
var
|
var
|
||||||
CurBreakPoint: TIDEBreakPoint;
|
CurBreakPoint: TIDEBreakPoint;
|
||||||
Action: TIDEBreakPointAction;
|
Action: TIDEBreakPointAction;
|
||||||
|
@ -20,9 +20,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtFilename
|
AnchorSideTop.Control = edtFilename
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 14
|
Height = 16
|
||||||
Top = 9
|
Top = 9
|
||||||
Width = 47
|
Width = 52
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Filename:'
|
Caption = 'Filename:'
|
||||||
@ -33,9 +33,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtLine
|
AnchorSideTop.Control = edtLine
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 14
|
Height = 16
|
||||||
Top = 36
|
Top = 38
|
||||||
Width = 24
|
Width = 26
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Line:'
|
Caption = 'Line:'
|
||||||
@ -46,9 +46,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtCondition
|
AnchorSideTop.Control = edtCondition
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 14
|
Height = 16
|
||||||
Top = 63
|
Top = 67
|
||||||
Width = 50
|
Width = 57
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Condition:'
|
Caption = 'Condition:'
|
||||||
@ -59,9 +59,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtCounter
|
AnchorSideTop.Control = edtCounter
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 14
|
Height = 16
|
||||||
Top = 90
|
Top = 96
|
||||||
Width = 45
|
Width = 51
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Hitcount:'
|
Caption = 'Hitcount:'
|
||||||
@ -72,9 +72,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = cmbGroup
|
AnchorSideTop.Control = cmbGroup
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 14
|
Height = 16
|
||||||
Top = 144
|
Top = 154
|
||||||
Width = 34
|
Width = 37
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Group:'
|
Caption = 'Group:'
|
||||||
@ -85,9 +85,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtAutocontinueMS
|
AnchorSideTop.Control = edtAutocontinueMS
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 14
|
Height = 16
|
||||||
Top = 117
|
Top = 125
|
||||||
Width = 95
|
Width = 104
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Auto continue after'
|
Caption = 'Auto continue after'
|
||||||
@ -98,10 +98,10 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = lblAutoContinue
|
AnchorSideTop.Control = lblAutoContinue
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 197
|
Left = 206
|
||||||
Height = 14
|
Height = 16
|
||||||
Top = 117
|
Top = 125
|
||||||
Width = 22
|
Width = 25
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
Caption = '(ms)'
|
Caption = '(ms)'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -112,9 +112,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtCounter
|
AnchorSideTop.Control = edtCounter
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 131
|
Left = 140
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 114
|
Top = 122
|
||||||
Width = 60
|
Width = 60
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -128,10 +128,10 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 131
|
Left = 140
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 87
|
Top = 93
|
||||||
Width = 313
|
Width = 304
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -144,9 +144,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtFilename
|
AnchorSideTop.Control = edtFilename
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 131
|
Left = 140
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 33
|
Top = 35
|
||||||
Width = 60
|
Width = 60
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -161,10 +161,10 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 131
|
Left = 140
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 313
|
Width = 304
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -180,14 +180,14 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 131
|
Left = 140
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 141
|
Top = 151
|
||||||
Width = 313
|
Width = 304
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ItemHeight = 13
|
ItemHeight = 15
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
Text = 'cmbGroup'
|
Text = 'cmbGroup'
|
||||||
end
|
end
|
||||||
@ -198,23 +198,23 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 155
|
Height = 165
|
||||||
Top = 168
|
Top = 180
|
||||||
Width = 438
|
Width = 438
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Actions'
|
Caption = 'Actions'
|
||||||
ClientHeight = 137
|
ClientHeight = 147
|
||||||
ClientWidth = 434
|
ClientWidth = 434
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object chkActionBreak: TCheckBox
|
object chkActionBreak: TCheckBox
|
||||||
AnchorSideLeft.Control = gbActions
|
AnchorSideLeft.Control = gbActions
|
||||||
AnchorSideTop.Control = gbActions
|
AnchorSideTop.Control = gbActions
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 19
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 45
|
Width = 49
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Break'
|
Caption = 'Break'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -224,9 +224,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtEnableGroups
|
AnchorSideTop.Control = edtEnableGroups
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 19
|
||||||
Top = 31
|
Top = 33
|
||||||
Width = 82
|
Width = 91
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Enable goups'
|
Caption = 'Enable goups'
|
||||||
@ -237,9 +237,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtDisableGroups
|
AnchorSideTop.Control = edtDisableGroups
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 19
|
||||||
Top = 58
|
Top = 62
|
||||||
Width = 88
|
Width = 98
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Disable groups'
|
Caption = 'Disable groups'
|
||||||
@ -251,10 +251,10 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = chkActionBreak
|
AnchorSideTop.Control = chkActionBreak
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 119
|
Left = 125
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 29
|
Top = 31
|
||||||
Width = 286
|
Width = 280
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -272,10 +272,10 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtEnableGroups
|
AnchorSideTop.Control = edtEnableGroups
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 119
|
Left = 125
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 56
|
Top = 60
|
||||||
Width = 286
|
Width = 280
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -292,9 +292,9 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtEvalExpression
|
AnchorSideTop.Control = edtEvalExpression
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 19
|
||||||
Top = 85
|
Top = 91
|
||||||
Width = 93
|
Width = 99
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Eval expression'
|
Caption = 'Eval expression'
|
||||||
@ -306,13 +306,13 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Control = edtLogMessage
|
AnchorSideTop.Control = edtLogMessage
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 19
|
||||||
Top = 112
|
Top = 120
|
||||||
Width = 80
|
Width = 89
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Log message'
|
Caption = 'Log message'
|
||||||
Enabled = False
|
OnChange = chkLogMessageChange
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object edtEvalExpression: TEdit
|
object edtEvalExpression: TEdit
|
||||||
@ -322,10 +322,10 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = gbActions
|
AnchorSideRight.Control = gbActions
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 119
|
Left = 125
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 83
|
Top = 89
|
||||||
Width = 309
|
Width = 303
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -341,10 +341,10 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = gbActions
|
AnchorSideRight.Control = gbActions
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 119
|
Left = 125
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 110
|
Top = 118
|
||||||
Width = 309
|
Width = 303
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -359,8 +359,8 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 36
|
Height = 14
|
||||||
Top = 329
|
Top = 351
|
||||||
Width = 438
|
Width = 438
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
@ -385,14 +385,14 @@ inherited BreakPropertyDlg: TBreakPropertyDlg
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 131
|
Left = 140
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 60
|
Top = 64
|
||||||
Width = 313
|
Width = 304
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ItemHeight = 13
|
ItemHeight = 15
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
Text = 'edtCondition'
|
Text = 'edtCondition'
|
||||||
end
|
end
|
||||||
|
@ -45,6 +45,7 @@ type
|
|||||||
const ABreakpoint: TIDEBreakPoint);
|
const ABreakpoint: TIDEBreakPoint);
|
||||||
procedure BreakPointUpdate(const ASender: TIDEBreakPoints;
|
procedure BreakPointUpdate(const ASender: TIDEBreakPoints;
|
||||||
const ABreakpoint: TIDEBreakPoint);
|
const ABreakpoint: TIDEBreakPoint);
|
||||||
|
procedure chkLogMessageChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
FBreakpointsNotification : TIDEBreakPointsNotification;
|
FBreakpointsNotification : TIDEBreakPointsNotification;
|
||||||
FBreakpoint: TIDEBreakPoint;
|
FBreakpoint: TIDEBreakPoint;
|
||||||
@ -68,6 +69,11 @@ begin
|
|||||||
UpdateInfo;
|
UpdateInfo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TBreakPropertyDlg.chkLogMessageChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
edtLogMessage.Enabled := chkLogMessage.Checked;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TBreakPropertyDlg.btnHelpClick(Sender: TObject);
|
procedure TBreakPropertyDlg.btnHelpClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
LazarusHelp.ShowHelpForIDEControl(Self);
|
LazarusHelp.ShowHelpForIDEControl(Self);
|
||||||
@ -104,8 +110,9 @@ begin
|
|||||||
if chkDisableGroups.Checked then Include(Actions, bpaDisableGroup);
|
if chkDisableGroups.Checked then Include(Actions, bpaDisableGroup);
|
||||||
if chkEnableGroups.Checked then Include(Actions, bpaEnableGroup);
|
if chkEnableGroups.Checked then Include(Actions, bpaEnableGroup);
|
||||||
// if chkEvalExpression.Checked then Include(Actions, bpaEValExpression);
|
// if chkEvalExpression.Checked then Include(Actions, bpaEValExpression);
|
||||||
// if chkLogMessage.Checked then Include(Actions, bpaLogMessage);
|
if chkLogMessage.Checked then Include(Actions, bpaLogMessage);
|
||||||
FBreakpoint.Actions := Actions;
|
FBreakpoint.Actions := Actions;
|
||||||
|
FBreakpoint.LogMessage := edtLogMessage.Text;
|
||||||
|
|
||||||
InputHistories.HistoryLists.GetList('BreakPointExpression', True).Add(edtCondition.Text);
|
InputHistories.HistoryLists.GetList('BreakPointExpression', True).Add(edtCondition.Text);
|
||||||
end;
|
end;
|
||||||
@ -144,7 +151,8 @@ begin
|
|||||||
chkDisableGroups.Checked := bpaDisableGroup in Actions;
|
chkDisableGroups.Checked := bpaDisableGroup in Actions;
|
||||||
chkEnableGroups.Checked := bpaEnableGroup in Actions;
|
chkEnableGroups.Checked := bpaEnableGroup in Actions;
|
||||||
// chkEvalExpression.Checked := bpaEValExpression in Actions;
|
// chkEvalExpression.Checked := bpaEValExpression in Actions;
|
||||||
// chkLogMessage.Checked := bpaLogMessage in Actions;
|
chkLogMessage.Checked := bpaLogMessage in Actions;
|
||||||
|
edtLogMessage.Text := FBreakpoint.LogMessage;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TBreakPropertyDlg.Create(AOwner: TComponent; ABreakPoint: TIDEBreakPoint);
|
constructor TBreakPropertyDlg.Create(AOwner: TComponent; ABreakPoint: TIDEBreakPoint);
|
||||||
|
@ -275,7 +275,8 @@ type
|
|||||||
TIDEBreakPointAction = (
|
TIDEBreakPointAction = (
|
||||||
bpaStop,
|
bpaStop,
|
||||||
bpaEnableGroup,
|
bpaEnableGroup,
|
||||||
bpaDisableGroup
|
bpaDisableGroup,
|
||||||
|
bpaLogMessage
|
||||||
);
|
);
|
||||||
TIDEBreakPointActions = set of TIDEBreakPointAction;
|
TIDEBreakPointActions = set of TIDEBreakPointAction;
|
||||||
|
|
||||||
@ -341,11 +342,11 @@ type
|
|||||||
FEnableGroupList: TList;
|
FEnableGroupList: TList;
|
||||||
FGroup: TIDEBreakPointGroup;
|
FGroup: TIDEBreakPointGroup;
|
||||||
FLoading: Boolean;
|
FLoading: Boolean;
|
||||||
|
FLogMessage: String;
|
||||||
protected
|
protected
|
||||||
procedure AssignLocationTo(Dest: TPersistent); override;
|
procedure AssignLocationTo(Dest: TPersistent); override;
|
||||||
procedure AssignTo(Dest: TPersistent); override;
|
procedure AssignTo(Dest: TPersistent); override;
|
||||||
procedure DoChanged; override;
|
procedure DoChanged; override;
|
||||||
|
|
||||||
function GetHitCount: Integer; override;
|
function GetHitCount: Integer; override;
|
||||||
function GetValid: TValidState; override;
|
function GetValid: TValidState; override;
|
||||||
procedure SetBreakHitCount(const AValue: Integer); override;
|
procedure SetBreakHitCount(const AValue: Integer); override;
|
||||||
@ -367,9 +368,11 @@ type
|
|||||||
function GetActions: TIDEBreakPointActions; virtual;
|
function GetActions: TIDEBreakPointActions; virtual;
|
||||||
function GetGroup: TIDEBreakPointGroup; virtual;
|
function GetGroup: TIDEBreakPointGroup; virtual;
|
||||||
function GetAutoContinueTime: Cardinal; virtual;
|
function GetAutoContinueTime: Cardinal; virtual;
|
||||||
|
function GetLogMessage: String; virtual;
|
||||||
procedure SetActions(const AValue: TIDEBreakPointActions); virtual;
|
procedure SetActions(const AValue: TIDEBreakPointActions); virtual;
|
||||||
procedure SetGroup(const AValue: TIDEBreakPointGroup); virtual;
|
procedure SetGroup(const AValue: TIDEBreakPointGroup); virtual;
|
||||||
procedure SetAutoContinueTime(const AValue: Cardinal); virtual;
|
procedure SetAutoContinueTime(const AValue: Cardinal); virtual;
|
||||||
|
procedure SetLogMessage(const AValue: String); virtual;
|
||||||
public
|
public
|
||||||
constructor Create(ACollection: TCollection); override;
|
constructor Create(ACollection: TCollection); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -389,6 +392,7 @@ type
|
|||||||
property AutoContinueTime: Cardinal read GetAutoContinueTime write SetAutoContinueTime;
|
property AutoContinueTime: Cardinal read GetAutoContinueTime write SetAutoContinueTime;
|
||||||
property Group: TIDEBreakPointGroup read GetGroup write SetGroup;
|
property Group: TIDEBreakPointGroup read GetGroup write SetGroup;
|
||||||
property Loading: Boolean read FLoading;
|
property Loading: Boolean read FLoading;
|
||||||
|
property LogMessage: String read GetLogMessage write SetLogMessage;
|
||||||
end;
|
end;
|
||||||
TIDEBreakPointClass = class of TIDEBreakPoint;
|
TIDEBreakPointClass = class of TIDEBreakPoint;
|
||||||
|
|
||||||
@ -402,6 +406,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure DoChanged; override;
|
procedure DoChanged; override;
|
||||||
procedure DoStateChange(const AOldState: TDBGState); virtual;
|
procedure DoStateChange(const AOldState: TDBGState); virtual;
|
||||||
|
procedure DoLogMessage(const AMessage: String); virtual;
|
||||||
property Debugger: TDebugger read GetDebugger;
|
property Debugger: TDebugger read GetDebugger;
|
||||||
public
|
public
|
||||||
constructor Create(ACollection: TCollection); override;
|
constructor Create(ACollection: TCollection); override;
|
||||||
@ -2116,7 +2121,8 @@ const
|
|||||||
DBGBreakPointActionNames: array[TIDEBreakPointAction] of string = (
|
DBGBreakPointActionNames: array[TIDEBreakPointAction] of string = (
|
||||||
'Stop',
|
'Stop',
|
||||||
'EnableGroup',
|
'EnableGroup',
|
||||||
'DisableGroup'
|
'DisableGroup',
|
||||||
|
'LogMessage'
|
||||||
);
|
);
|
||||||
|
|
||||||
function DBGCommandNameToCommand(const s: string): TDBGCommand;
|
function DBGCommandNameToCommand(const s: string): TDBGCommand;
|
||||||
@ -3495,6 +3501,20 @@ begin
|
|||||||
Changed;
|
Changed;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIDEBreakPoint.SetLogMessage(const AValue: String);
|
||||||
|
begin
|
||||||
|
if FLogMessage <> AValue then
|
||||||
|
begin
|
||||||
|
FLogMessage := AValue;
|
||||||
|
Changed;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TIDEBreakPoint.GetLogMessage: String;
|
||||||
|
begin
|
||||||
|
Result := FLogMessage;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIDEBreakPoint.AssignLocationTo(Dest: TPersistent);
|
procedure TIDEBreakPoint.AssignLocationTo(Dest: TPersistent);
|
||||||
var
|
var
|
||||||
DestBreakPoint: TBaseBreakPoint absolute Dest;
|
DestBreakPoint: TBaseBreakPoint absolute Dest;
|
||||||
@ -3512,6 +3532,7 @@ begin
|
|||||||
then begin
|
then begin
|
||||||
TIDEBreakPoint(Dest).Actions := FActions;
|
TIDEBreakPoint(Dest).Actions := FActions;
|
||||||
TIDEBreakPoint(Dest).AutoContinueTime := FAutoContinueTime;
|
TIDEBreakPoint(Dest).AutoContinueTime := FAutoContinueTime;
|
||||||
|
TIDEBreakPoint(Dest).LogMessage := FLogMessage;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (Collection <> nil) and (TIDEBreakPoints(Collection).FMaster <> nil)
|
if (Collection <> nil) and (TIDEBreakPoints(Collection).FMaster <> nil)
|
||||||
@ -3642,9 +3663,11 @@ begin
|
|||||||
Changed;
|
Changed;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEBreakPoint.DoHit (const ACount: Integer; var AContinue: Boolean );
|
procedure TIDEBreakPoint.DoHit(const ACount: Integer; var AContinue: Boolean );
|
||||||
begin
|
begin
|
||||||
inherited DoHit(ACount, AContinue);
|
inherited DoHit(ACount, AContinue);
|
||||||
|
if bpaLogMessage in Actions
|
||||||
|
then FMaster.DoLogMessage(FLogMessage);
|
||||||
if bpaEnableGroup in Actions
|
if bpaEnableGroup in Actions
|
||||||
then EnableGroups;
|
then EnableGroups;
|
||||||
if bpaDisableGroup in Actions
|
if bpaDisableGroup in Actions
|
||||||
@ -3713,6 +3736,7 @@ begin
|
|||||||
InitialEnabled:=XMLConfig.GetValue(Path+'InitialEnabled/Value',true);
|
InitialEnabled:=XMLConfig.GetValue(Path+'InitialEnabled/Value',true);
|
||||||
Enabled:=FInitialEnabled;
|
Enabled:=FInitialEnabled;
|
||||||
FLine:=XMLConfig.GetValue(Path+'Line/Value',-1);
|
FLine:=XMLConfig.GetValue(Path+'Line/Value',-1);
|
||||||
|
FLogMessage:=XMLConfig.GetValue(Path+'LogMessage/Value','');
|
||||||
NewActions:=[];
|
NewActions:=[];
|
||||||
for CurAction:=Low(TIDEBreakPointAction) to High(TIDEBreakPointAction) do
|
for CurAction:=Low(TIDEBreakPointAction) to High(TIDEBreakPointAction) do
|
||||||
if XMLConfig.GetValue(
|
if XMLConfig.GetValue(
|
||||||
@ -3780,6 +3804,7 @@ begin
|
|||||||
AConfig.SetDeleteValue(APath+'Source/Value',Filename,'');
|
AConfig.SetDeleteValue(APath+'Source/Value',Filename,'');
|
||||||
AConfig.SetDeleteValue(APath+'InitialEnabled/Value',InitialEnabled,true);
|
AConfig.SetDeleteValue(APath+'InitialEnabled/Value',InitialEnabled,true);
|
||||||
AConfig.SetDeleteValue(APath+'Line/Value',Line,-1);
|
AConfig.SetDeleteValue(APath+'Line/Value',Line,-1);
|
||||||
|
AConfig.SetDeleteValue(APath+'LogMessage/Value',LogMessage,'');
|
||||||
|
|
||||||
for CurAction := Low(TIDEBreakPointAction) to High(TIDEBreakPointAction) do
|
for CurAction := Low(TIDEBreakPointAction) to High(TIDEBreakPointAction) do
|
||||||
begin
|
begin
|
||||||
@ -3889,6 +3914,8 @@ begin
|
|||||||
if BreakHitcount > 0
|
if BreakHitcount > 0
|
||||||
then ACanContinue := cnt < BreakHitcount;
|
then ACanContinue := cnt < BreakHitcount;
|
||||||
DoHit(cnt, ACanContinue);
|
DoHit(cnt, ACanContinue);
|
||||||
|
if Assigned(FSlave)
|
||||||
|
then FSlave.DoHit(cnt, ACanContinue);
|
||||||
Debugger.DoBreakpointHit(Self, ACanContinue)
|
Debugger.DoBreakpointHit(Self, ACanContinue)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3914,6 +3941,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TDBGBreakPoint.DoLogMessage(const AMessage: String);
|
||||||
|
begin
|
||||||
|
Debugger.DoDbgEvent(ecBreakpoint, etBreakpointMessage, 'Breakpoint Message: ' + AMessage);
|
||||||
|
end;
|
||||||
|
|
||||||
function TDBGBreakPoint.GetDebugger: TDebugger;
|
function TDBGBreakPoint.GetDebugger: TDebugger;
|
||||||
begin
|
begin
|
||||||
Result := TDBGBreakPoints(Collection).FDebugger;
|
Result := TDBGBreakPoints(Collection).FDebugger;
|
||||||
|
@ -4624,6 +4624,7 @@ resourcestring
|
|||||||
lisBreak = 'Break';
|
lisBreak = 'Break';
|
||||||
lisEnableGroup = 'Enable Group';
|
lisEnableGroup = 'Enable Group';
|
||||||
lisDisableGroup = 'Disable Group';
|
lisDisableGroup = 'Disable Group';
|
||||||
|
lisLogMessage = 'Log Message';
|
||||||
lisAutoContinue = 'Auto Continue';
|
lisAutoContinue = 'Auto Continue';
|
||||||
lisDisabled = 'Disabled';
|
lisDisabled = 'Disabled';
|
||||||
lisInvalidOff = 'Invalid (Off)';
|
lisInvalidOff = 'Invalid (Off)';
|
||||||
@ -4647,7 +4648,6 @@ resourcestring
|
|||||||
lisMS = '(ms)';
|
lisMS = '(ms)';
|
||||||
lisActions = 'Actions:';
|
lisActions = 'Actions:';
|
||||||
lisEvalExpression = 'Eval expression';
|
lisEvalExpression = 'Eval expression';
|
||||||
lisLogMessage = 'Log message';
|
|
||||||
|
|
||||||
// Debug Output Dialog
|
// Debug Output Dialog
|
||||||
lisCopyAllOutputClipboard = 'Copy all output to clipboard';
|
lisCopyAllOutputClipboard = 'Copy all output to clipboard';
|
||||||
|
Loading…
Reference in New Issue
Block a user