diff --git a/ide/debugmanager.pas b/ide/debugmanager.pas index fd1bb106ad..0c01ba978f 100644 --- a/ide/debugmanager.pas +++ b/ide/debugmanager.pas @@ -1873,6 +1873,8 @@ end; procedure TDebugManager.ConnectSourceNotebookEvents; begin SrcEditMenuAddWatchAtCursor.OnClick:=@mnuAddWatchClicked; + SrcEditMenuEvaluateModify.OnClick:=@mnuViewDebugDialogClick; + SrcEditMenuEvaluateModify.Tag := Ord(ddtEvaluate); end; procedure TDebugManager.SetupMainBarShortCuts; @@ -1910,6 +1912,7 @@ procedure TDebugManager.SetupSourceMenuShortCuts; begin SrcEditMenuToggleBreakpoint.Command:=GetCommand(ecToggleBreakPoint); SrcEditMenuRunToCursor.Command:=GetCommand(ecRunToCursor); + SrcEditMenuEvaluateModify.Command:=GetCommand(ecEvaluate); SrcEditMenuAddWatchAtCursor.Command:=GetCommand(ecAddWatch); SrcEditMenuViewCallStack.Command:=GetCommand(ecToggleCallStack); end; @@ -1944,6 +1947,8 @@ begin itmRunMenuEvaluate.Enabled := (not DebuggerInvalid) and (dcEvaluate in FDebugger.Commands); + SrcEditMenuEvaluateModify.Enabled := (not DebuggerInvalid) + and (dcEvaluate in FDebugger.Commands); itmRunMenuAddWatch.Enabled := True; // always allow to add a watch // TODO: add other debugger menuitems // TODO: implement by actions diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 7f971f879d..0d4a628573 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -1934,6 +1934,7 @@ resourcestring uemShowUnitInfo = 'Unit Info'; uemDebugWord = 'Debug'; uemToggleBreakpoint = '&Toggle Breakpoint'; + uemEvaluateModify = '&Evaluate/Modify...'; uemAddWatchAtCursor = 'Add &Watch At Cursor'; uemRunToCursor='&Run to Cursor'; uemViewCallStack = 'View Call Stack'; diff --git a/ide/sourceeditor.lrs b/ide/sourceeditor.lrs index 60eec2d264..cee514d0bc 100644 --- a/ide/sourceeditor.lrs +++ b/ide/sourceeditor.lrs @@ -1,3 +1,5 @@ +{ This is an automatically generated lazarus resource file } + LazarusResources.Add('TSourceNotebook','FORMDATA',[ 'TPF0'#241#15'TSourceNotebook'#14'SourceNotebook'#4'Left'#3#21#2#6'Height'#3 +','#1#3'Top'#3'v'#1#5'Width'#3#144#1#14'AllowDropFiles'#9#7'Caption'#6#14'So' diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index d1c67140c7..12e2d9ff53 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -874,6 +874,7 @@ var // debugging SrcEditMenuToggleBreakpoint: TIDEMenuCommand; SrcEditMenuRunToCursor: TIDEMenuCommand; + SrcEditMenuEvaluateModify: TIDEMenuCommand; SrcEditMenuAddWatchAtCursor: TIDEMenuCommand; SrcEditMenuViewCallStack: TIDEMenuCommand; // refactoring @@ -1041,6 +1042,9 @@ begin // register the Debug submenu items SrcEditMenuToggleBreakpoint:=RegisterIDEMenuCommand(AParent,'Toggle Breakpoint', uemToggleBreakpoint); + SrcEditMenuEvaluateModify:=RegisterIDEMenuCommand(AParent,'Evaluate/Modify...', + uemEvaluateModify, nil, nil, nil,'debugger_modify'); + SrcEditMenuEvaluateModify.Enabled:=False; SrcEditMenuAddWatchAtCursor:=RegisterIDEMenuCommand(AParent, 'Add Watch at Cursor',uemAddWatchAtCursor); SrcEditMenuRunToCursor:=RegisterIDEMenuCommand(AParent,