private TracePipeline(DebugContext debugContext) { _debugContext = debugContext; _traceFrame = new ThreadLocal<DebugFrame>(); debugContext.DebugCallback = this; debugContext.DebugMode = DebugMode.FullyEnabled; }
public static ITracePipeline CreateInstance(DebugContext debugContext) { ContractUtils.RequiresNotNull(debugContext, "debugContext"); if (debugContext.DebugCallback != null) throw new InvalidOperationException(ErrorStrings.DebugContextAlreadyConnectedToTracePipeline); return new TracePipeline(debugContext); }
internal DebuggableLambdaBuilder(DebugContext debugContext, DebugLambdaInfo lambdaInfo) { _debugContext = debugContext; _lambdaInfo = lambdaInfo; _alias = _lambdaInfo.LambdaAlias; _debugContextExpression = AstUtils.Constant(debugContext); // Variables _verifiedLocals = new List<MSAst.ParameterExpression>(); _verifiedLocalNames = new Dictionary<string, object>(); _pendingLocals = new List<MSAst.ParameterExpression>(); _variableInfos = new List<VariableInfo>(); _pendingToVariableInfosMap = new Dictionary<MSAst.ParameterExpression, VariableInfo>(); _pendingToVerifiedLocalsMap = new Dictionary<MSAst.ParameterExpression, MSAst.ParameterExpression>(); // DebugMode expression that's used by the transformed code to see what the current debug mode is _globalDebugMode = Ast.Property(_debugContextExpression, "Mode"); }
internal DebugThread(DebugContext debugContext) { _debugContext = debugContext; _threadId = ThreadingUtils.GetCurrentThreadId(); }
internal DefaultDebugThread(DebugContext debugContext) : base(debugContext) { _frames = new List<FrameRuntimeVariablesPair>(); }
internal DebugThread(DebugContext debugContext) { _debugContext = debugContext; _managedThread = Thread.CurrentThread; }
internal void EnsureDebugContext() { if (_debugContext == null || _tracePipeline == null) { lock (this) { if (_debugContext == null) { _debugContext = DebugContext.CreateInstance(); _tracePipeline = Microsoft.Scripting.Debugging.TracePipeline.CreateInstance(_debugContext); } } } if (_tracebackListeners == null) { _tracebackListeners = new Stack<TotemTracebackListener>(); // push the default listener _tracebackListeners.Push(new TotemTracebackListener(this)); } }