コード例 #1
0
        public ObjectValue[] GetExpressionValues(string[] expressions, EvaluationOptions options)
        {
            if (!hasDebugInfo)
            {
                DebuggerLoggingService.LogMessage("Cannot get expression values: no debugging symbols for frame: {0}", this);

                var vals = new ObjectValue [expressions.Length];
                for (int n = 0; n < expressions.Length; n++)
                {
                    vals[n] = ObjectValue.CreateUnknown(expressions[n]);
                }

                return(vals);
            }

            if (options.UseExternalTypeResolver)
            {
                var resolved = new string [expressions.Length];
                for (int n = 0; n < expressions.Length; n++)
                {
                    resolved[n] = ResolveExpression(expressions[n]);
                }

                expressions = resolved;
            }

            var values = sourceBacktrace.GetExpressionValues(index, expressions, options);

            ObjectValue.ConnectCallbacks(this, values);
            return(values);
        }
コード例 #2
0
        public ObjectValue[] GetAllLocals()
        {
            if (!hasDebugInfo)
            {
                DebuggerLoggingService.LogMessage("Cannot get local variables: no debugging symbols for frame: {0}", this);
                return(new ObjectValue [0]);
            }

            var evaluator = session.FindExpressionEvaluator(this);

            return(evaluator != null?evaluator.GetLocals(this) : GetAllLocals(session.EvaluationOptions));
        }
コード例 #3
0
        public ObjectValue[] GetAllLocals(EvaluationOptions options)
        {
            if (!hasDebugInfo)
            {
                DebuggerLoggingService.LogMessage("Cannot get local variables: no debugging symbols for frame: {0}", this);
                return(new ObjectValue [0]);
            }

            var values = sourceBacktrace.GetAllLocals(index, options);

            ObjectValue.ConnectCallbacks(this, values);
            return(values);
        }
コード例 #4
0
        public ObjectValue GetThisReference(EvaluationOptions options)
        {
            if (!hasDebugInfo)
            {
                DebuggerLoggingService.LogMessage("Cannot get `this' reference: no debugging symbols for frame: {0}", this);
                return(null);
            }

            var value = sourceBacktrace.GetThisReference(index, options);

            if (value != null)
            {
                ObjectValue.ConnectCallbacks(this, value);
            }

            return(value);
        }
コード例 #5
0
        public ObjectValue GetExpressionValue(string expression, EvaluationOptions options)
        {
            if (!hasDebugInfo)
            {
                DebuggerLoggingService.LogMessage("Cannot get expression value: no debugging symbols for frame: {0}", this);
                return(ObjectValue.CreateUnknown(expression));
            }

            if (options.UseExternalTypeResolver)
            {
                expression = ResolveExpression(expression);
            }

            var values = sourceBacktrace.GetExpressionValues(index, new [] { expression }, options);

            ObjectValue.ConnectCallbacks(this, values);
            return(values [0]);
        }