public static void Main(string[] args) { var debugger = new DllDebugger(new TextMessageSubscriber(), new GitSourceRepository(new UserInputParser(), new DirectoryInfo("f:\\checked_out"))); var process = Process.GetProcessesByName("SampleCecilTestbed").First(); debugger.Debug(process.Id); while (debugger.NumberOfModulesLoaded < 2) { } Console.Out.WriteLine(); debugger.SetBreakPoint(47, "SampleCecil", "Class1"); // debugger.SetBreakPoint(56, "SampleCecil", "Class1"); debugger.SetBreakPoint(61, "SampleCecil", "Class1"); debugger.WaitTillExit(); }
public void CanAttach() { var debugger = new DllDebugger(new TextMessageSubscriber(), new GitSourceRepository(new UserInputParser(), new DirectoryInfo("f:\\checked_out"))); var process = Process.GetProcessesByName("SampleCecilTestbed").First(); debugger.Debug(process.Id); debugger.SetBreakPoint(56, "SampleCecil", "Class1"); debugger.WaitTillExit(); }
private void SetBreakpoint(string transcribed, DllDebugger debugger) { var strings = transcribed.Split(' '); try { debugger.SetBreakPoint(int.Parse(strings[1]), strings[2], strings[3]); } catch (Exception e) { Console.Out.WriteLine("Could not set breakpoint."); } }