public static void Apply() { // We can only apply a limited set of options here since some // are set at session creation time. var opt = Debugger.Options; opt.StepOverPropertiesAndOperators = Current.StepOverPropertiesAndOperators; var eval = opt.EvaluationOptions; eval.AllowMethodEvaluation = Current.AllowMethodEvaluation; eval.AllowTargetInvoke = Current.AllowTargetInvoke; eval.AllowToStringCalls = Current.AllowToStringCalls; eval.ChunkRawStrings = Current.ChunkRawStrings; eval.CurrentExceptionTag = Current.ExceptionIdentifier; eval.EllipsizeStrings = Current.EllipsizeStrings; eval.EllipsizedLength = Current.EllipsizeThreshold; eval.EvaluationTimeout = Current.EvaluationTimeout; eval.FlattenHierarchy = Current.FlattenHierarchy; eval.IntegerDisplayFormat = Current.HexadecimalIntegers ? IntegerDisplayFormat.Hexadecimal : IntegerDisplayFormat.Decimal; eval.MemberEvaluationTimeout = Current.MemberEvaluationTimeout; if (Current.EnableControlC) { CommandLine.SetControlCHandler(); } else { CommandLine.UnsetControlCHandler(); } }
public static void Run(FileInfo file) { lock (_lock) { EnsureCreated(); CurrentExecutable = file; CurrentAddress = null; CurrentPort = -1; _debuggeeKilled = false; _kind = SessionKind.Launched; var info = new SoftDebuggerStartInfo(Configuration.Current.RuntimePrefix, new Dictionary <string, string>(EnvironmentVariables)) { Command = file.FullName, Arguments = Arguments, WorkingDirectory = WorkingDirectory, StartArgs = { MaxConnectionAttempts = Configuration.Current.MaxConnectionAttempts, TimeBetweenConnectionAttempts = Configuration.Current.ConnectionAttemptInterval } }; // We need to ignore `SIGINT` while we start the inferior // process so that it inherits that signal disposition. CommandLine.UnsetControlCHandler(); _session.Run(info, Options); CommandLine.InferiorExecuting = true; } }