예제 #1
0
        public void ShouldCreateSequence()
        {
            var assembly = Path.GetFullPath("DebugMe.exe");
            var arguments = "";
            var breakPoint = new Breakpoint(assembly, null, 0, 0);

            var process = new ClrProcess();
            process.Start(assembly, arguments, breakPoint);

            Assert.AreEqual(23, process.Sequence.Length);
        }
예제 #2
0
 static void Main(string[] args)
 {
     var process = new ClrProcess();
     var assembly = Path.GetFullPath("DebugMe.exe");
     process.Start(assembly, "", new Breakpoint(assembly, null, 0, 0));
     foreach (var snapshot in process.Sequence)
     {
         System.Console.WriteLine("{0}:{1}", snapshot.Position.File, snapshot.Position.LineStart);
         var locals = "\t";
         foreach (var parameter in snapshot.Parameters)
             locals += string.Format("{0}={1}, ", parameter.Name, parameter.Value);
         foreach (var variable in snapshot.Variables)
             locals += string.Format("{0}={1}, ", variable.Name, variable.Value);
         System.Console.WriteLine(locals);
     }
     System.Console.ReadLine();
 }