MG: keys for debugging

git-svn-id: trunk@360 -
This commit is contained in:
lazarus 2001-10-18 13:34:03 +00:00
parent 022b78efb8
commit 8028612117
2 changed files with 51 additions and 7 deletions

View File

@ -49,6 +49,8 @@ const
ecPause = ecRun + 1; ecPause = ecRun + 1;
ecStepInto = ecPause + 1; ecStepInto = ecPause + 1;
ecStepOver = ecStepInto + 1; ecStepOver = ecStepInto + 1;
ecRunToCursor = ecStepOver + 1;
ecStopProgram = ecRunToCursor + 1;
ecJumpToEditor = ecUserFirst + 300; ecJumpToEditor = ecUserFirst + 300;
ecToggleFormUnit = ecUserFirst + 301; ecToggleFormUnit = ecUserFirst + 301;
@ -315,6 +317,8 @@ begin
ecPause: Result:= 'pause program'; ecPause: Result:= 'pause program';
ecStepInto: Result:= 'step into'; ecStepInto: Result:= 'step into';
ecStepOver: Result:= 'step over'; ecStepOver: Result:= 'step over';
ecRunToCursor: Result:= 'run to cursor';
ecStopProgram: Result:= 'stop program';
ecJumpToEditor: Result:='jump to editor'; ecJumpToEditor: Result:='jump to editor';
ecToggleFormUnit: Result:='toggle between form and unit'; ecToggleFormUnit: Result:='toggle between form and unit';
ecGotoEditor1: Result:= 'goto editor 1'; ecGotoEditor1: Result:= 'goto editor 1';
@ -907,6 +911,8 @@ begin
Add('Pause program',ecPause,VK_UNKNOWN,[],VK_UNKNOWN,[]); Add('Pause program',ecPause,VK_UNKNOWN,[],VK_UNKNOWN,[]);
Add('Step into',ecStepInto,VK_F7,[],VK_UNKNOWN,[]); Add('Step into',ecStepInto,VK_F7,[],VK_UNKNOWN,[]);
Add('Step over',ecStepOver,VK_F8,[],VK_UNKNOWN,[]); Add('Step over',ecStepOver,VK_F8,[],VK_UNKNOWN,[]);
Add('Run to cursor',ecStepOver,VK_F4,[],VK_UNKNOWN,[]);
Add('Stop program',ecStepOver,VK_F2,[SSCtrl],VK_UNKNOWN,[]);
Add('Go to source editor 1',ecGotoEditor0,VK_1,[ssAlt],VK_UNKNOWN,[]); Add('Go to source editor 1',ecGotoEditor0,VK_1,[ssAlt],VK_UNKNOWN,[]);
Add('Go to source editor 2',ecGotoEditor0,VK_2,[ssAlt],VK_UNKNOWN,[]); Add('Go to source editor 2',ecGotoEditor0,VK_2,[ssAlt],VK_UNKNOWN,[]);

View File

@ -1425,28 +1425,66 @@ end;
Procedure TMainIDE.OnSrcNotebookProcessCommand(Sender: TObject; Procedure TMainIDE.OnSrcNotebookProcessCommand(Sender: TObject;
Command: integer; var Handled: boolean); Command: integer; var Handled: boolean);
begin begin
Handled:=true;
case Command of case Command of
ecBuild: ecBuild:
begin begin
Handled:=true;
DoBuildProject; DoBuildProject;
end; end;
ecRun: ecRun:
begin begin
Handled:=true; if ToolStatus=itNone then
if DoBuildProject<>mrOk then exit; if DoBuildProject<>mrOk then begin
Handled:=false;
exit;
end;
DoRunProject; DoRunProject;
end; end;
ecPause:
begin
DoPauseProject;
end;
ecStepInto:
begin
if ToolStatus=itNone then
if DoBuildProject<>mrOk then begin
Handled:=false;
exit;
end;
DoStepIntoProject;
end;
ecStepOver:
begin
if ToolStatus=itNone then
if DoBuildProject<>mrOk then begin
Handled:=false;
exit;
end;
DoStepOverProject;
end;
ecRunToCursor:
begin
if ToolStatus=itNone then
if DoBuildProject<>mrOk then begin
Handled:=false;
exit;
end;
DoRunToCursor;
end;
ecStopProgram:
begin
DoStopProject;
end;
ecFindProcedureDefinition,ecFindProcedureMethod: ecFindProcedureDefinition,ecFindProcedureMethod:
begin begin
Handled:=true;
DoJumpToProcedureSection; DoJumpToProcedureSection;
end; end;
ecCompleteCode: ecCompleteCode:
begin begin
Handled:=true;
DoCompleteCodeAtCursor; DoCompleteCodeAtCursor;
end; end;
else
Handled:=false;
end; end;
end; end;
@ -4295,8 +4333,8 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.124 2001/10/18 13:01:30 lazarus Revision 1.125 2001/10/18 13:34:03 lazarus
MG: fixed speedbuttons numglyphs>1 and started IDE debugging MG: keys for debugging
Revision 1.123 2001/10/17 13:43:15 lazarus Revision 1.123 2001/10/17 13:43:15 lazarus
MG: added find previous to source editor MG: added find previous to source editor