Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <jestedfa@microsoft.com>2019-05-03 23:40:04 +0300
committerJeffrey Stedfast <jestedfa@microsoft.com>2019-05-03 23:40:04 +0300
commit192fadf6bbe46c9efef2362cced15c3e5f88b9c4 (patch)
treefccbcfaaceba0e5c737d3155a7a0ade84aab2525 /main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol
parent5d1b2678675b6967ad100dae2b021bba257c6bab (diff)
[Debugger] Implement Set Next Statement for the VsCode debugger backend
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/698194/
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol')
-rw-r--r--main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs b/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs
index c48f1599d3..6f194c82e2 100644
--- a/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs
+++ b/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs
@@ -100,6 +100,24 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol
return threads;
}
+ public override bool CanSetNextStatement {
+ get { return true; }
+ }
+
+ protected override void OnSetNextStatement (long threadId, string fileName, int line, int column)
+ {
+ var source = new Source { Name = Path.GetFileName (fileName), Path = fileName };
+ var request = new GotoTargetsRequest (source, line) { Column = column };
+ var response = protocolClient.SendRequestSync (request);
+ var target = response.Targets.FirstOrDefault (x => x.Line <= line && x.EndLine >= line && x.Column <= column && x.EndColumn >= column);
+
+ if (target == null)
+ throw new NotSupportedException ();
+
+ protocolClient.SendRequestSync (new GotoRequest ((int) threadId, target.Id));
+ RaiseStopEvent ();
+ }
+
Dictionary<BreakEvent, BreakEventInfo> breakpoints = new Dictionary<BreakEvent, BreakEventInfo> ();
protected override BreakEventInfo OnInsertBreakEvent (BreakEvent breakEvent)