Exemple #1
0
        public IVSDebugPropertyProxy EvaluateExpression(string expression)
        {
            if (string.IsNullOrEmpty(expression))
            {
                throw new ArgumentNullException("Expression is empty");
            }

            _log.Info("Evaluating expression {0}.", expression);

            IVSDebugPropertyProxy resultDebugProperty = _cache.TryGetFromCache(expression);

            if (resultDebugProperty != null)
            {
                return(resultDebugProperty);
            }

            IDebugProperty2 debugProperty = GetVsDebugProperty(expression);

            _log.Info($"Done evaluating expression {expression} ");

            resultDebugProperty = VSDebugPropertyProxy.Create(debugProperty);
            _log.Info($"Property retreived { resultDebugProperty }");

            _cache.Cache(expression, resultDebugProperty);

            return(resultDebugProperty);
        }
Exemple #2
0
        public IVSDebugPropertyProxy GetLocals()
        {
            IDebugProperty2 d;

            _stackFrame.GetDebugProperty(out d).ThrowOnFailure();

            if (d == null)
            {
                throw new InvalidOperationException("Error receiving locals");
            }

            return(VSDebugPropertyProxy.Create(d));
        }