Пример #1
0
 void IDebuggeeListener.X_FromDebuggee(byte[] json)
 {
     lock (this)
     {
         if (fakeBreakpointMode != null)
         {
             return;
         }
         toVSCode.SendJSONEncodedMessage(json);
     }
 }
Пример #2
0
 void IDebuggeeListener.VSDebuggeeMessage(IDebuggee debugee, byte[] json)
 {
     lock (this) {
         // we intercept the messages here and reverse-engineer the local threads :)
         try {
             string jsonString = encoding.GetString(json);
             var    j          = JsonConvert.DeserializeObject <Response>(jsonString);
             if (j.command == "threads" && j.type == "response")
             {
                 ThreadResponse jThread = JsonConvert.DeserializeObject <ThreadResponse>(jsonString);
                 for (int ti = 0; ti < jThread.body.threads.Count; ti++)
                 {
                     debuggeeThreads.Add(jThread.body.threads[ti].id, debugee);
                     //Utilities.LogMessageToFile("Associated thread: " + jThread.body.threads[ti].id + " -> " + debugee.GetHashCode());
                 }
             }
         } catch (Exception /*e*/) {
             //Utilities.LogMessageToFile("Exception in VSDebuggeeMessage: " + e);
         }
         toVSCode.SendJSONEncodedMessage(json);
     }
 }