mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 20:39:09 +02:00
implemented enable/disable/delete breakpoints in same source
git-svn-id: trunk@4229 -
This commit is contained in:
parent
583cd45e6a
commit
3a6822f197
@ -2,6 +2,7 @@ object BreakpointsDlg: TBreakpointsDlg
|
|||||||
CAPTION = 'Breakpoint list'
|
CAPTION = 'Breakpoint list'
|
||||||
CLIENTHEIGHT = 205
|
CLIENTHEIGHT = 205
|
||||||
CLIENTWIDTH = 629
|
CLIENTWIDTH = 629
|
||||||
|
ONCREATE = BreakpointsDlgCREATE
|
||||||
VISIBLE = True
|
VISIBLE = True
|
||||||
HORZSCROLLBAR.PAGE = 630
|
HORZSCROLLBAR.PAGE = 630
|
||||||
VERTSCROLLBAR.PAGE = 206
|
VERTSCROLLBAR.PAGE = 206
|
||||||
@ -11,7 +12,6 @@ object BreakpointsDlg: TBreakpointsDlg
|
|||||||
WIDTH = 629
|
WIDTH = 629
|
||||||
HELPTYPE = htkeyword
|
HELPTYPE = htkeyword
|
||||||
object lvBreakPoints: TLISTVIEW
|
object lvBreakPoints: TLISTVIEW
|
||||||
ALIGN = alclient
|
|
||||||
ANCHORS = [aktop, akleft]
|
ANCHORS = [aktop, akleft]
|
||||||
COLUMNS = <
|
COLUMNS = <
|
||||||
item
|
item
|
||||||
@ -55,14 +55,16 @@ object BreakpointsDlg: TBreakpointsDlg
|
|||||||
ONCLICK = lvBreakPointsClick
|
ONCLICK = lvBreakPointsClick
|
||||||
ONDBLCLICK = lvBreakPointsDBLCLICK
|
ONDBLCLICK = lvBreakPointsDBLCLICK
|
||||||
ONSELECTITEM = lvBreakPointsSelectItem
|
ONSELECTITEM = lvBreakPointsSelectItem
|
||||||
|
LEFT = 72
|
||||||
HEIGHT = 205
|
HEIGHT = 205
|
||||||
WIDTH = 629
|
TOP = 2
|
||||||
|
WIDTH = 557
|
||||||
HELPTYPE = htkeyword
|
HELPTYPE = htkeyword
|
||||||
end
|
end
|
||||||
object mnuPopup: TPOPUPMENU
|
object mnuPopup: TPOPUPMENU
|
||||||
ONPOPUP = mnuPopupPopup
|
ONPOPUP = mnuPopupPopup
|
||||||
left = 100
|
left = 24
|
||||||
top = 96
|
top = 8
|
||||||
object popAdd: TMENUITEM
|
object popAdd: TMENUITEM
|
||||||
CAPTION = 'Add...'
|
CAPTION = 'Add...'
|
||||||
object popAddSourceBP: TMENUITEM
|
object popAddSourceBP: TMENUITEM
|
||||||
@ -102,5 +104,20 @@ object BreakpointsDlg: TBreakpointsDlg
|
|||||||
CAPTION = '&Delete All'
|
CAPTION = '&Delete All'
|
||||||
ONCLICK = popDeleteAllClick
|
ONCLICK = popDeleteAllClick
|
||||||
end
|
end
|
||||||
|
object N3: TMENUITEM
|
||||||
|
CAPTION = '-'
|
||||||
|
end
|
||||||
|
object popDisableAllSameSource: TMENUITEM
|
||||||
|
CAPTION = 'Disable All in same source'
|
||||||
|
ONCLICK = popDisableAllSameSourceCLICK
|
||||||
|
end
|
||||||
|
object popEnableAllSameSource: TMENUITEM
|
||||||
|
CAPTION = 'Enable All in same source'
|
||||||
|
ONCLICK = popEnableAllSameSourceCLICK
|
||||||
|
end
|
||||||
|
object popDeleteAllSameSource: TMENUITEM
|
||||||
|
CAPTION = 'Delete All in same source'
|
||||||
|
ONCLICK = popDeleteAllSameSourceCLICK
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2,30 +2,36 @@
|
|||||||
|
|
||||||
LazarusResources.Add('TBreakpointsDlg','FORMDATA',[
|
LazarusResources.Add('TBreakpointsDlg','FORMDATA',[
|
||||||
'TPF0'#15'TBreakpointsDlg'#14'BreakpointsDlg'#7'CAPTION'#6#15'Breakpoint list'
|
'TPF0'#15'TBreakpointsDlg'#14'BreakpointsDlg'#7'CAPTION'#6#15'Breakpoint list'
|
||||||
+#12'CLIENTHEIGHT'#3#205#0#11'CLIENTWIDTH'#3'u'#2#7'VISIBLE'#9#18'HORZSCROLLB'
|
+#12'CLIENTHEIGHT'#3#205#0#11'CLIENTWIDTH'#3'u'#2#8'ONCREATE'#7#20'Breakpoint'
|
||||||
+'AR.PAGE'#3'v'#2#18'VERTSCROLLBAR.PAGE'#3#206#0#4'LEFT'#3'T'#1#6'HEIGHT'#3
|
+'sDlgCREATE'#7'VISIBLE'#9#18'HORZSCROLLBAR.PAGE'#3'v'#2#18'VERTSCROLLBAR.PAG'
|
||||||
+#205#0#3'TOP'#2'u'#5'WIDTH'#3'u'#2#8'HELPTYPE'#7#9'htkeyword'#0#9'TLISTVIEW'
|
+'E'#3#206#0#4'LEFT'#3'T'#1#6'HEIGHT'#3#205#0#3'TOP'#2'u'#5'WIDTH'#3'u'#2#8'H'
|
||||||
+#13'lvBreakPoints'#5'ALIGN'#7#8'alclient'#7'ANCHORS'#11#5'aktop'#6'akleft'#0
|
+'ELPTYPE'#7#9'htkeyword'#0#9'TLISTVIEW'#13'lvBreakPoints'#7'ANCHORS'#11#5'ak'
|
||||||
+#7'COLUMNS'#14#1#7'CAPTION'#6#5'State'#7'VISIBLE'#9#5'WIDTH'#2'2'#0#1#7'CAPT'
|
+'top'#6'akleft'#0#7'COLUMNS'#14#1#7'CAPTION'#6#5'State'#7'VISIBLE'#9#5'WIDTH'
|
||||||
+'ION'#6#16'Filename/Address'#7'VISIBLE'#9#5'WIDTH'#3#150#0#0#1#7'CAPTION'#6
|
+#2'2'#0#1#7'CAPTION'#6#16'Filename/Address'#7'VISIBLE'#9#5'WIDTH'#3#150#0#0#1
|
||||||
+#11'Line/Length'#7'VISIBLE'#9#5'WIDTH'#2'd'#0#1#7'CAPTION'#6#9'Condition'#7
|
+#7'CAPTION'#6#11'Line/Length'#7'VISIBLE'#9#5'WIDTH'#2'd'#0#1#7'CAPTION'#6#9
|
||||||
+'VISIBLE'#9#5'WIDTH'#2'K'#0#1#7'CAPTION'#6#6'Action'#7'VISIBLE'#9#5'WIDTH'#2
|
+'Condition'#7'VISIBLE'#9#5'WIDTH'#2'K'#0#1#7'CAPTION'#6#6'Action'#7'VISIBLE'
|
||||||
+'2'#0#1#7'CAPTION'#6#10'Pass Count'#7'VISIBLE'#9#5'WIDTH'#2'd'#0#1#7'CAPTION'
|
+#9#5'WIDTH'#2'2'#0#1#7'CAPTION'#6#10'Pass Count'#7'VISIBLE'#9#5'WIDTH'#2'd'#0
|
||||||
+#6#5'Group'#7'VISIBLE'#9#5'WIDTH'#2'2'#0#0#11'MULTISELECT'#9#9'POPUPMENU'#7#8
|
+#1#7'CAPTION'#6#5'Group'#7'VISIBLE'#9#5'WIDTH'#2'2'#0#0#11'MULTISELECT'#9#9
|
||||||
+'mnuPopup'#9'VIEWSTYLE'#7#8'vsreport'#7'ONCLICK'#7#18'lvBreakPointsClick'#10
|
+'POPUPMENU'#7#8'mnuPopup'#9'VIEWSTYLE'#7#8'vsreport'#7'ONCLICK'#7#18'lvBreak'
|
||||||
+'ONDBLCLICK'#7#21'lvBreakPointsDBLCLICK'#12'ONSELECTITEM'#7#23'lvBreakPoints'
|
+'PointsClick'#10'ONDBLCLICK'#7#21'lvBreakPointsDBLCLICK'#12'ONSELECTITEM'#7
|
||||||
+'SelectItem'#6'HEIGHT'#3#205#0#5'WIDTH'#3'u'#2#8'HELPTYPE'#7#9'htkeyword'#0#0
|
+#23'lvBreakPointsSelectItem'#4'LEFT'#2'H'#6'HEIGHT'#3#205#0#3'TOP'#2#2#5'WID'
|
||||||
+#10'TPOPUPMENU'#8'mnuPopup'#7'ONPOPUP'#7#13'mnuPopupPopup'#4'left'#2'd'#3'to'
|
+'TH'#3'-'#2#8'HELPTYPE'#7#9'htkeyword'#0#0#10'TPOPUPMENU'#8'mnuPopup'#7'ONPO'
|
||||||
+'p'#2'`'#0#9'TMENUITEM'#6'popAdd'#7'CAPTION'#6#6'Add...'#0#9'TMENUITEM'#14'p'
|
+'PUP'#7#13'mnuPopupPopup'#4'left'#2#24#3'top'#2#8#0#9'TMENUITEM'#6'popAdd'#7
|
||||||
+'opAddSourceBP'#7'CAPTION'#6#18'&Source breakpoint'#7'ENABLED'#8#7'ONCLICK'#7
|
+'CAPTION'#6#6'Add...'#0#9'TMENUITEM'#14'popAddSourceBP'#7'CAPTION'#6#18'&Sou'
|
||||||
+#19'popAddSourceBPClick'#0#0#0#9'TMENUITEM'#2'N1'#7'CAPTION'#6#1'-'#0#0#9'TM'
|
+'rce breakpoint'#7'ENABLED'#8#7'ONCLICK'#7#19'popAddSourceBPClick'#0#0#0#9'T'
|
||||||
+'ENUITEM'#13'popProperties'#7'CAPTION'#6#11'&Properties'#7'ONCLICK'#7#18'pop'
|
+'MENUITEM'#2'N1'#7'CAPTION'#6#1'-'#0#0#9'TMENUITEM'#13'popProperties'#7'CAPT'
|
||||||
+'PropertiesClick'#0#0#9'TMENUITEM'#10'popEnabled'#7'CAPTION'#6#8'&Enabled'#19
|
+'ION'#6#11'&Properties'#7'ONCLICK'#7#18'popPropertiesClick'#0#0#9'TMENUITEM'
|
||||||
+'SHOWALWAYSCHECKABLE'#9#7'ONCLICK'#7#15'popEnabledClick'#0#0#9'TMENUITEM'#9
|
+#10'popEnabled'#7'CAPTION'#6#8'&Enabled'#19'SHOWALWAYSCHECKABLE'#9#7'ONCLICK'
|
||||||
+'popDelete'#7'CAPTION'#6#7'&Delete'#7'ONCLICK'#7#14'popDeleteClick'#0#0#9'TM'
|
+#7#15'popEnabledClick'#0#0#9'TMENUITEM'#9'popDelete'#7'CAPTION'#6#7'&Delete'
|
||||||
+'ENUITEM'#2'N2'#7'CAPTION'#6#1'-'#0#0#9'TMENUITEM'#13'popDisableAll'#7'CAPTI'
|
+#7'ONCLICK'#7#14'popDeleteClick'#0#0#9'TMENUITEM'#2'N2'#7'CAPTION'#6#1'-'#0#0
|
||||||
+'ON'#6#12'D&isable All'#7'ONCLICK'#7#18'popDisableAllClick'#0#0#9'TMENUITEM'
|
+#9'TMENUITEM'#13'popDisableAll'#7'CAPTION'#6#12'D&isable All'#7'ONCLICK'#7#18
|
||||||
+#12'popEnableAll'#7'CAPTION'#6#11'&Enable All'#7'ONCLICK'#7#17'popEnableAllC'
|
+'popDisableAllClick'#0#0#9'TMENUITEM'#12'popEnableAll'#7'CAPTION'#6#11'&Enab'
|
||||||
+'lick'#0#0#9'TMENUITEM'#12'popDeleteAll'#7'CAPTION'#6#11'&Delete All'#7'ONCL'
|
+'le All'#7'ONCLICK'#7#17'popEnableAllClick'#0#0#9'TMENUITEM'#12'popDeleteAll'
|
||||||
+'ICK'#7#17'popDeleteAllClick'#0#0#0#0
|
+#7'CAPTION'#6#11'&Delete All'#7'ONCLICK'#7#17'popDeleteAllClick'#0#0#9'TMENU'
|
||||||
|
+'ITEM'#2'N3'#7'CAPTION'#6#1'-'#0#0#9'TMENUITEM'#23'popDisableAllSameSource'#7
|
||||||
|
+'CAPTION'#6#26'Disable All in same source'#7'ONCLICK'#7#28'popDisableAllSame'
|
||||||
|
+'SourceCLICK'#0#0#9'TMENUITEM'#22'popEnableAllSameSource'#7'CAPTION'#6#25'En'
|
||||||
|
+'able All in same source'#7'ONCLICK'#7#27'popEnableAllSameSourceCLICK'#0#0#9
|
||||||
|
+'TMENUITEM'#22'popDeleteAllSameSource'#7'CAPTION'#6#25'Delete All in same so'
|
||||||
|
+'urce'#7'ONCLICK'#7#27'popDeleteAllSameSourceCLICK'#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -60,12 +60,20 @@ type
|
|||||||
popDisableAll: TMenuItem;
|
popDisableAll: TMenuItem;
|
||||||
popEnableAll: TMenuItem;
|
popEnableAll: TMenuItem;
|
||||||
popDeleteAll: TMenuItem;
|
popDeleteAll: TMenuItem;
|
||||||
|
N3: TMenuItem; //--------------
|
||||||
|
popDisableAllSameSource: TMenuItem;
|
||||||
|
popEnableAllSameSource: TMenuItem;
|
||||||
|
popDeleteAllSameSource: TMenuItem;
|
||||||
|
procedure BreakpointsDlgCREATE(Sender: TObject);
|
||||||
procedure lvBreakPointsClick(Sender: TObject);
|
procedure lvBreakPointsClick(Sender: TObject);
|
||||||
procedure lvBreakPointsDBLCLICK(Sender: TObject);
|
procedure lvBreakPointsDBLCLICK(Sender: TObject);
|
||||||
procedure lvBreakPointsSelectItem(Sender: TObject; AItem: TListItem;
|
procedure lvBreakPointsSelectItem(Sender: TObject; AItem: TListItem;
|
||||||
Selected: Boolean);
|
Selected: Boolean);
|
||||||
procedure mnuPopupPopup(Sender: TObject);
|
procedure mnuPopupPopup(Sender: TObject);
|
||||||
procedure popAddSourceBPClick(Sender: TObject);
|
procedure popAddSourceBPClick(Sender: TObject);
|
||||||
|
procedure popDeleteAllSameSourceCLICK(Sender: TObject);
|
||||||
|
procedure popDisableAllSameSourceCLICK(Sender: TObject);
|
||||||
|
procedure popEnableAllSameSourceCLICK(Sender: TObject);
|
||||||
procedure popPropertiesClick(Sender: TObject);
|
procedure popPropertiesClick(Sender: TObject);
|
||||||
procedure popEnabledClick(Sender: TObject);
|
procedure popEnabledClick(Sender: TObject);
|
||||||
procedure popDeleteClick(Sender: TObject);
|
procedure popDeleteClick(Sender: TObject);
|
||||||
@ -212,6 +220,11 @@ procedure TBreakPointsDlg.lvBreakPointsClick(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TBreakPointsDlg.BreakpointsDlgCREATE(Sender: TObject);
|
||||||
|
begin
|
||||||
|
lvBreakPoints.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.lvBreakPointsDBLCLICK(Sender: TObject);
|
procedure TBreakPointsDlg.lvBreakPointsDBLCLICK(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
DoJumpToCurrentBreakPoint;
|
DoJumpToCurrentBreakPoint;
|
||||||
@ -240,6 +253,12 @@ begin
|
|||||||
popEnabled.Checked := false;
|
popEnabled.Checked := false;
|
||||||
popDelete.Enabled := Enable;
|
popDelete.Enabled := Enable;
|
||||||
|
|
||||||
|
// 'All in same source' menuitems
|
||||||
|
popDisableAllSameSource.Enabled := Enable;
|
||||||
|
popDeleteAllSameSource.Enabled := Enable;
|
||||||
|
popEnableAllSameSource.Enabled := Enable;
|
||||||
|
|
||||||
|
// 'All' menuitems
|
||||||
Enable := lvBreakPoints.Items.Count>0;
|
Enable := lvBreakPoints.Items.Count>0;
|
||||||
popDisableAll.Enabled := Enable;
|
popDisableAll.Enabled := Enable;
|
||||||
popDeleteAll.Enabled := Enable;
|
popDeleteAll.Enabled := Enable;
|
||||||
@ -250,10 +269,78 @@ procedure TBreakPointsDlg.popAddSourceBPClick(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TBreakPointsDlg.popDeleteAllSameSourceCLICK(Sender: TObject);
|
||||||
|
var
|
||||||
|
n: Integer;
|
||||||
|
Item: TListItem;
|
||||||
|
CurItem: TListItem;
|
||||||
|
CurBreakPoint: TIDEBreakPoint;
|
||||||
|
Filename: String;
|
||||||
|
begin
|
||||||
|
CurItem:=lvBreakPoints.Selected;
|
||||||
|
if (CurItem=nil) then exit;
|
||||||
|
Filename:=TIDEBreakpoint(CurItem.Data).Source;
|
||||||
|
if MessageDlg('Delete all breakpoints?',
|
||||||
|
'Delete all breakpoints in file "'+Filename+'"?',
|
||||||
|
mtConfirmation,[mbYes,mbCancel],0)<>mrYes
|
||||||
|
then exit;
|
||||||
|
for n := lvBreakPoints.Items.Count - 1 downto 0 do
|
||||||
|
begin
|
||||||
|
Item := lvBreakPoints.Items[n];
|
||||||
|
CurBreakPoint:=TIDEBreakPoint(Item.Data);
|
||||||
|
if CompareFilenames(CurBreakPoint.Source,Filename)=0
|
||||||
|
then CurBreakPoint.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TBreakPointsDlg.popDisableAllSameSourceCLICK(Sender: TObject);
|
||||||
|
var
|
||||||
|
n: Integer;
|
||||||
|
Item: TListItem;
|
||||||
|
CurItem: TListItem;
|
||||||
|
CurBreakPoint: TIDEBreakPoint;
|
||||||
|
Filename: String;
|
||||||
|
begin
|
||||||
|
CurItem:=lvBreakPoints.Selected;
|
||||||
|
if (CurItem=nil) then exit;
|
||||||
|
Filename:=TIDEBreakpoint(CurItem.Data).Source;
|
||||||
|
for n := 0 to lvBreakPoints.Items.Count - 1 do
|
||||||
|
begin
|
||||||
|
Item := lvBreakPoints.Items[n];
|
||||||
|
CurBreakPoint:=TIDEBreakPoint(Item.Data);
|
||||||
|
if CompareFilenames(CurBreakPoint.Source,Filename)=0
|
||||||
|
then CurBreakPoint.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TBreakPointsDlg.popEnableAllSameSourceCLICK(Sender: TObject);
|
||||||
|
var
|
||||||
|
n: Integer;
|
||||||
|
Item: TListItem;
|
||||||
|
CurItem: TListItem;
|
||||||
|
CurBreakPoint: TIDEBreakPoint;
|
||||||
|
Filename: String;
|
||||||
|
begin
|
||||||
|
CurItem:=lvBreakPoints.Selected;
|
||||||
|
if (CurItem=nil) then exit;
|
||||||
|
Filename:=TIDEBreakpoint(CurItem.Data).Source;
|
||||||
|
for n := 0 to lvBreakPoints.Items.Count - 1 do
|
||||||
|
begin
|
||||||
|
Item := lvBreakPoints.Items[n];
|
||||||
|
CurBreakPoint:=TIDEBreakPoint(Item.Data);
|
||||||
|
if CompareFilenames(CurBreakPoint.Source,Filename)=0
|
||||||
|
then CurBreakPoint.Enabled := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.popDeleteAllClick(Sender: TObject);
|
procedure TBreakPointsDlg.popDeleteAllClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
n: Integer;
|
n: Integer;
|
||||||
begin
|
begin
|
||||||
|
if MessageDlg('Delete all breakpoints?',
|
||||||
|
'Delete all breakpoints?',
|
||||||
|
mtConfirmation,[mbYes,mbCancel],0)<>mrYes
|
||||||
|
then exit;
|
||||||
for n := lvBreakPoints.Items.Count - 1 downto 0 do
|
for n := lvBreakPoints.Items.Count - 1 downto 0 do
|
||||||
TIDEBreakPoint(lvBreakPoints.Items[n].Data).Free;
|
TIDEBreakPoint(lvBreakPoints.Items[n].Data).Free;
|
||||||
end;
|
end;
|
||||||
@ -328,8 +415,8 @@ const
|
|||||||
// enabled valid
|
// enabled valid
|
||||||
DEBUG_STATE: array[Boolean, TValidState] of String = (
|
DEBUG_STATE: array[Boolean, TValidState] of String = (
|
||||||
{vsUnknown, vsValid, vsInvalid}
|
{vsUnknown, vsValid, vsInvalid}
|
||||||
{Disabled} ('?', 'Disabled','Invalid'),
|
{Disabled} ('? (Off)','Disabled','Invalid (Off)'),
|
||||||
{Endabled} ('?', 'Enabled', 'Invalid'));
|
{Endabled} ('? (On)', 'Enabled', 'Invalid (On)'));
|
||||||
var
|
var
|
||||||
Action: TIDEBreakPointAction;
|
Action: TIDEBreakPointAction;
|
||||||
S: String;
|
S: String;
|
||||||
@ -402,6 +489,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.19 2003/06/03 11:20:12 mattias
|
||||||
|
implemented enable/disable/delete breakpoints in same source
|
||||||
|
|
||||||
Revision 1.18 2003/06/03 08:02:33 mattias
|
Revision 1.18 2003/06/03 08:02:33 mattias
|
||||||
implemented showing source lines in breakpoints dialog
|
implemented showing source lines in breakpoints dialog
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ end;
|
|||||||
|
|
||||||
function TOutputFilter.Execute(TheProcess: TProcess): boolean;
|
function TOutputFilter.Execute(TheProcess: TProcess): boolean;
|
||||||
const
|
const
|
||||||
BufSize = 100;
|
BufSize = 1000;
|
||||||
var
|
var
|
||||||
i, Count, LineStart : longint;
|
i, Count, LineStart : longint;
|
||||||
OutputLine, Buf : String;
|
OutputLine, Buf : String;
|
||||||
|
Loading…
Reference in New Issue
Block a user