Esempio n. 1
0
 /// <summary>
 /// Notify listeners that we're suspended.
 /// </summary>
 /// <param name="reason">The reason the VM is suspended</param>
 /// <param name="thread">The thread involved in the suspend. This can be null depending on the reason.</param>
 /// <returns>True if the suspend is performed, false if execution is continued.</returns>
 protected internal virtual bool OnSuspended(SuspendReason reason, DalvikThread thread)
 {
     if ((reason == SuspendReason.SingleStep) && (thread != null))
     {
         // Make sure we're are a location where we have a source.
         thread.OnProcessSuspended(reason, true);
         var topFrame = thread.GetCallStack().FirstOrDefault();
         if (topFrame != null)
         {
             var location = topFrame.GetDocumentLocationAsync().Await(VmTimeout);
             if (location.Document == null)
             {
                 // Not my code
                 StepOutLastRequestAsync();
                 return(false);
             }
         }
     }
     ThreadManager.OnProcessSuspended(reason, thread);
     ReferenceTypeManager.OnProcessSuspended(reason);
     isSuspended = true;
     IsSuspendedChanged.Fire(this);
     return(true);
 }
Esempio n. 2
0
 /// <summary>
 /// Initialize the debugger so we're ready to start debugging.
 /// </summary>
 internal Task PrepareForDebuggingAsync()
 {
     // Prepare all managers
     return(ExceptionManager.PrepareForDebuggingAsync().ContinueWith(t => ReferenceTypeManager.PrepareForDebuggingAsync()).Unwrap());
 }