Ejemplo n.º 1
0
 public Variable Evaluate(StackFrame frame, string expression)
 {
     try
     {
         return(_debugger.Instance.Evaluate(frame.ThreadId, frame.Index, expression));
     }
     catch (FaultException e)
     {
         throw new Exception(e.Message);
     }
 }
Ejemplo n.º 2
0
        public virtual StackFrame[] GetStackFrames(int threadId)
        {
            var machine = _threadManager.GetTokenForThread(threadId).Machine;
            var frames  = machine.GetExecutionFrames();
            var result  = new StackFrame[frames.Count];
            int index   = 0;

            foreach (var frameInfo in frames)
            {
                var frame = new StackFrame();
                frame.LineNumber    = frameInfo.LineNumber;
                frame.Index         = index++;
                frame.MethodName    = frameInfo.MethodName;
                frame.Source        = frameInfo.Source;
                result[frame.Index] = frame;
            }
            return(result);
        }