Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #9552 from mono/jstedfast-debugger-session-step-av…
Browse files Browse the repository at this point in the history
…oid-threadpool-queue

[Debugger] Update VSCodeDebuggerSession Step methods to send requests…
  • Loading branch information
sgmunn authored Jan 23, 2020
2 parents b624686 + 872072f commit e0c8fcf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ protected override void OnExit ()

protected override void OnFinish ()
{
try {
protocolClient.SendRequestSync (new StepOutRequest (currentThreadId));
} catch (Exception ex) {
protocolClient.SendRequest (new StepOutRequest (currentThreadId), null, (args, ex) => {
DebuggerLoggingService.LogError ("[VSCodeDebugger] StepOut request failed", ex);
}
});
}

List<ProcessInfo> processInfo = new List<ProcessInfo>();
Expand Down Expand Up @@ -229,20 +227,16 @@ void UpdateExceptions ()

protected override void OnNextInstruction ()
{
try {
protocolClient.SendRequestSync (new NextRequest (currentThreadId));
} catch (Exception ex) {
protocolClient.SendRequest (new NextRequest (currentThreadId), null, (args, ex) => {
DebuggerLoggingService.LogError ("[VSCodeDebugger] NextInstruction request failed", ex);
}
});
}

protected override void OnNextLine ()
{
try {
protocolClient.SendRequestSync (new NextRequest (currentThreadId));
} catch (Exception ex) {
protocolClient.SendRequest (new NextRequest (currentThreadId), null, (args, ex) => {
DebuggerLoggingService.LogError ("[VSCodeDebugger] StepOver request failed", ex);
}
});
}

protected override void OnRemoveBreakEvent (BreakEventInfo eventInfo)
Expand Down Expand Up @@ -606,8 +600,7 @@ void UpdateBreakpoints ()
breakpoints.Select (b => b.Key).OfType<MonoFunctionBreakpoint> ()
.Where (b => b.Enabled)
.Select (b => new VsCodeFunctionBreakpoint (b.FunctionName))
.ToList ()),
(obj) => { });
.ToList ()), null);
}

protected InitializeResponse Capabilities;
Expand All @@ -619,20 +612,16 @@ protected override void OnSetActiveThread (long processId, long threadId)

protected override void OnStepInstruction ()
{
try {
protocolClient.SendRequestSync (new StepInRequest (currentThreadId));
} catch (Exception ex) {
protocolClient.SendRequest (new StepInRequest (currentThreadId), null, (args, ex) => {
DebuggerLoggingService.LogError ("[VSCodeDebugger] StepInstruction request failed", ex);
}
});
}

protected override void OnStepLine ()
{
try {
protocolClient.SendRequestSync (new StepInRequest (currentThreadId));
} catch (Exception ex) {
protocolClient.SendRequest (new StepInRequest (currentThreadId), null, (args, ex) => {
DebuggerLoggingService.LogError ("[VSCodeDebugger] StepIn request failed", ex);
}
});
}

protected override void OnStop ()
Expand All @@ -656,7 +645,8 @@ public override void Dispose ()
try {
protocolClient.SendRequestSync (new DisconnectRequest ());
protocolClient.Stop ();
} catch {
} catch (Exception ex) {
DebuggerLoggingService.LogError ("[VSCodeDebugger] Disconnect request failed", ex);
}
protocolClient = null;
}
Expand Down

0 comments on commit e0c8fcf

Please sign in to comment.