Skip to content

Commit a4a225a

Browse files
committed
Broadcasting debugger actions
1 parent 2f02ba0 commit a4a225a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/services/Builder.Services.Debug.pas

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ function TDebugService.CanContinue(): boolean;
272272

273273
procedure TDebugService.Start(const AHost: string; const APort: integer; const ATimeOut: Int64);
274274
begin
275+
TGlobalBuilderChain.BroadcastEvent(TDebugActionEvent.Create(TDebugAction.Start));
276+
275277
if not (FConnectionStatus in [TDebuggerConnectionStatus.OutOfWork, TDebuggerConnectionStatus.Stopped]) then
276278
raise EDebuggerIsBusy.Create('Debugger is busy');
277279

@@ -284,6 +286,8 @@ procedure TDebugService.Start(const AHost: string; const APort: integer; const A
284286

285287
procedure TDebugService.Stop;
286288
begin
289+
TGlobalBuilderChain.BroadcastEvent(TDebugActionEvent.Create(TDebugAction.Stop));
290+
287291
if (FConnectionStatus <> TDebuggerConnectionStatus.Started) then
288292
raise EDebuggerNotStarted.Create('Debugger is not started.');
289293

@@ -309,6 +313,8 @@ procedure TDebugService.Stop;
309313

310314
procedure TDebugService.Continue;
311315
begin
316+
TGlobalBuilderChain.BroadcastEvent(TDebugActionEvent.Create(TDebugAction.Continue));
317+
312318
var LContinue := TContinueRequest.Create();
313319
try
314320
LContinue.Arguments.SingleThread := false;
@@ -331,6 +337,8 @@ procedure TDebugService.Continue;
331337

332338
procedure TDebugService.Pause;
333339
begin
340+
TGlobalBuilderChain.BroadcastEvent(TDebugActionEvent.Create(TDebugAction.Pause));
341+
334342
var LPause := TPauseRequest.Create();
335343
try
336344
FDebugger.SendRequest<TPauseResponse>(
@@ -351,6 +359,8 @@ procedure TDebugService.Pause;
351359

352360
procedure TDebugService.StepIn;
353361
begin
362+
TGlobalBuilderChain.BroadcastEvent(TDebugActionEvent.Create(TDebugAction.StepIn));
363+
354364
var LStepIn := TStepInRequest.Create();
355365
try
356366
if FCurrentStoppedThreadId = 0 then
@@ -379,6 +389,8 @@ procedure TDebugService.StepIn;
379389

380390
procedure TDebugService.StepOver;
381391
begin
392+
TGlobalBuilderChain.BroadcastEvent(TDebugActionEvent.Create(TDebugAction.StepOver));
393+
382394
var LNext := TNextRequest.Create();
383395
try
384396
if FCurrentStoppedThreadId = 0 then
@@ -408,6 +420,8 @@ procedure TDebugService.StepOver;
408420

409421
procedure TDebugService.StepOut;
410422
begin
423+
TGlobalBuilderChain.BroadcastEvent(TDebugActionEvent.Create(TDebugAction.StepOut));
424+
411425
var LStepOut := TStepOutRequest.Create();
412426
try
413427
if FCurrentStoppedThreadId = 0 then

0 commit comments

Comments
 (0)