/// <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); }
/// <summary> /// Process has resumed /// </summary> protected virtual void OnResumed() { isSuspended = false; IsSuspendedChanged.Fire(this); }