Skip to content

Commit

Permalink
Adding support for multithreaded stack traces.
Browse files Browse the repository at this point in the history
Added C# extension as a dependency, making sure that it is installed'
along side the debugger extension.
Path added in launch config to remove the warnings within VS Code.
  • Loading branch information
miniwolf committed Jun 1, 2018
1 parent 0104f96 commit 765ddea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/DebugSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public StoppedEvent(int tid, string reasn, string txt = null)
: base("stopped", new {
threadId = tid,
reason = reasn,
text = txt
text = txt,
allThreadsStopped = true
}) { }
}

Expand Down Expand Up @@ -284,6 +285,11 @@ public SetVariablesResponseBody(string value, string type, int variablesReferenc
}
}

public class ContinueResponseBody : ResponseBody
{
public bool allThreadsContinued = true;
}

public class SetFunctionBreakpointsBody : ResponseBody
{
public Breakpoint[] breakpoints { get; }
Expand Down
6 changes: 4 additions & 2 deletions src/Protocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public abstract class ProtocolServer

protected const int BUFFER_SIZE = 4096;
protected const string TWO_CRLF = "\r\n\r\n";
protected static readonly Regex CONTENT_LENGTH_MATCHER = new Regex(@"Content-Length: (\d+)");
protected static Regex CONTENT_LENGTH_MATCHER;

protected static readonly Encoding Encoding = System.Text.Encoding.UTF8;
protected static Encoding Encoding = System.Text.Encoding.UTF8;

private int _sequenceNumber;
private Dictionary<int, TaskCompletionSource<Response>> _pendingRequests;
Expand All @@ -130,6 +130,8 @@ public abstract class ProtocolServer

public ProtocolServer()
{
CONTENT_LENGTH_MATCHER = new Regex(@"Content-Length: (\d+)");
Encoding = Encoding.UTF8;
_sequenceNumber = 1;
_bodyLength = -1;
_rawData = new ByteBuffer();
Expand Down

0 comments on commit 765ddea

Please sign in to comment.