/// <summary> /// Creates a JObject for an expression which raised an exception instead of returning a value. /// </summary> public JEvaluationResult(JProcess process, string exceptionText, string expression, JStackFrame frame) { _process = process; _expression = expression; _frame = frame; _exceptionText = exceptionText; }
internal JThread(JProcess process, long identity, bool isWorkerThread) { _process = process; _identity = identity; _isWorkerThread = isWorkerThread; _name = ""; }
public static void RegisterProcess(Guid id, JProcess process) { lock (_targets) { EnsureListenerSocket(); _targets[id] = new WeakReference(process); } }
public JDebugProcessReplEvaluator(JProcess process) { _process = process; _threadId = process.GetThreads()[0].Id; _languageVersion = process.LanguageVersion; EnsureConnected(); }
/// <summary> /// Creates a JObject for an expression which successfully returned a value. /// </summary> public JEvaluationResult(JProcess process, string objRepr, string hexRepr, string typeName, string expression, string childText, bool childIsIndex, bool childIsEnumerate, JStackFrame frame, bool isExpandable) { _process = process; _expression = expression; _frame = frame; _objRepr = objRepr; _hexRepr = hexRepr; _typeName = typeName; _isExpandable = isExpandable; _childText = childText; _childIsIndex = childIsIndex; _childIsEnumerate = childIsEnumerate; }
public static ConnErrorMessages TryAttach(int pid, out JProcess process) { try { process = new JProcess(pid); return ConnErrorMessages.None; } catch (AttachException ex) { process = null; return ex.Error; } }
internal void SwitchProcess(JProcess process, bool verbose) { var newEvaluator = _evaluators[process.Id]; if (newEvaluator != _activeEvaluator) { _activeEvaluator = newEvaluator; ActiveProcessChanged(); if (verbose) { _window.WriteLine(String.Format("Current process changed to {0}", process.Id)); } } }
internal void DetachProcess(JProcess process) { int id = process.Id; JDebugProcessReplEvaluator evaluator; if (_evaluators.TryGetValue(id, out evaluator)) { evaluator.AvailableScopesChanged -= new EventHandler<EventArgs>(evaluator_AvailableScopesChanged); evaluator.MultipleScopeSupportChanged -= new EventHandler<EventArgs>(evaluator_MultipleScopeSupportChanged); process.DisconnectRepl(); _evaluators.Remove(id); if (_activeEvaluator == evaluator) { _activeEvaluator = null; } ActiveProcessChanged(); } }
internal void AttachProcess(JProcess process) { if (_evaluators.ContainsKey(process.Id)) { // Process is already attached, so just switch to it if needed SwitchProcess(process, false); return; } process.ProcessExited += new EventHandler<ProcessExitedEventArgs>(OnProcessExited); var evaluator = new JDebugProcessReplEvaluator(process); evaluator.Window = _window; evaluator.AvailableScopesChanged += new EventHandler<EventArgs>(evaluator_AvailableScopesChanged); evaluator.MultipleScopeSupportChanged += new EventHandler<EventArgs>(evaluator_MultipleScopeSupportChanged); _evaluators.Add(process.Id, evaluator); _activeEvaluator = evaluator; }