mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:48:03 +02:00
Debugger: Disable "run to cursor" when debugger is stopped. This command is limited to the current frame (function). It can not be used to start a project. (also disable dcJumpTo, dcStepOut)
git-svn-id: trunk@39042 -
This commit is contained in:
parent
29954198f2
commit
f3f7450f44
@ -2979,7 +2979,7 @@ const
|
||||
{dsNone } [],
|
||||
{dsIdle } [dcEnvironment],
|
||||
{dsStop } [dcRun, dcStepOver, dcStepInto, dcStepOverInstr, dcStepIntoInstr,
|
||||
dcStepOut, dcRunTo, dcJumpto, dcAttach, dcBreak, dcWatch, dcEvaluate, dcEnvironment,
|
||||
dcAttach, dcBreak, dcWatch, dcEvaluate, dcEnvironment,
|
||||
dcSendConsoleInput],
|
||||
{dsPause} [dcRun, dcStop, dcStepOver, dcStepInto, dcStepOverInstr, dcStepIntoInstr,
|
||||
dcStepOut, dcRunTo, dcJumpto, dcDetach, dcBreak, dcWatch, dcLocal, dcEvaluate, dcModify,
|
||||
|
@ -7369,7 +7369,7 @@ begin
|
||||
Result := False;
|
||||
case State of
|
||||
dsStop: begin
|
||||
Result := StartDebugging(ectRunTo, [ASource, ALine]);
|
||||
Result := False;
|
||||
end;
|
||||
dsPause: begin
|
||||
CancelBeforeRun;
|
||||
@ -7520,7 +7520,7 @@ begin
|
||||
Result := False;
|
||||
case State of
|
||||
dsStop: begin
|
||||
Result := StartDebugging;
|
||||
Result := False;
|
||||
end;
|
||||
dsPause: begin
|
||||
CancelBeforeRun;
|
||||
|
@ -1818,8 +1818,8 @@ begin
|
||||
and (dcStepOut in FDebugger.Commands) and (FDebugger.State = dsPause);
|
||||
itmRunMenuStepOut.Enabled := StepOutSpeedButton.Enabled;
|
||||
// Run to cursor
|
||||
itmRunMenuRunToCursor.Enabled := CanRun and (not DebuggerIsValid
|
||||
or (dcRunTo in FDebugger.Commands));
|
||||
itmRunMenuRunToCursor.Enabled := CanRun and DebuggerIsValid
|
||||
and (dcRunTo in FDebugger.Commands);
|
||||
// Stop
|
||||
itmRunMenuStop.Enabled := CanRun and DebuggerIsValid;
|
||||
StopSpeedButton.Enabled := itmRunMenuStop.Enabled;
|
||||
@ -2352,6 +2352,12 @@ end;
|
||||
|
||||
function TDebugManager.DoStepOutProject: TModalResult;
|
||||
begin
|
||||
if (FDebugger = nil) or not(dcRunTo in FDebugger.Commands)
|
||||
then begin
|
||||
Result := mrAbort;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if (MainIDE.DoInitProjectRun <> mrOK)
|
||||
or (MainIDE.ToolStatus <> itDebugger)
|
||||
or (FDebugger = nil) or Destroying
|
||||
@ -2699,6 +2705,12 @@ begin
|
||||
{$ifdef VerboseDebugger}
|
||||
DebugLn('TDebugManager.DoRunToCursor A');
|
||||
{$endif}
|
||||
if (FDebugger = nil) or not(dcRunTo in FDebugger.Commands)
|
||||
then begin
|
||||
Result := mrAbort;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if (MainIDE.DoInitProjectRun <> mrOK)
|
||||
or (MainIDE.ToolStatus <> itDebugger)
|
||||
or (FDebugger = nil) or Destroying
|
||||
|
Loading…
Reference in New Issue
Block a user