private void ProcessBreakMode() { try { Process2 process = (Process2)r_dte.Debugger.DebuggedProcesses.Item(1); Dictionary <int, String> threadNames = new Dictionary <int, string>(); Threads threads = process.Threads; int count = threads.Count; for (int i = 1; i <= count; ++i) { Thread thread = threads.Item(i); int id = thread.ID; String name = thread.Name; threadNames.Add(id, name); } int procid = process.ProcessID; System.Diagnostics.Process proc = System.Diagnostics.Process.GetProcessById(procid); using (Dac dac = new Dac(proc)) { ThreadStackManager man = dac.ConstructThreadStacks(); VisualStudioProcess vsProc = new VisualStudioProcess(process); r_myControl.Refresh(man, vsProc, threadNames); } } catch (ExpiredException ex) { r_myControl.Refresh(ex); } catch (Exception ex) { r_myControl.Refresh(ex); } }
private void ProcessBreakMode() { try { Process2 process = (Process2)r_dte.Debugger.DebuggedProcesses.Item(1); Dictionary<int, String> threadNames = new Dictionary<int, string>(); Threads threads = process.Threads; int count = threads.Count; for (int i = 1; i <= count; ++i) { Thread thread = threads.Item(i); int id = thread.ID; String name = thread.Name; threadNames.Add(id, name); } int procid = process.ProcessID; System.Diagnostics.Process proc = System.Diagnostics.Process.GetProcessById(procid); using (Dac dac = new Dac(proc)) { ThreadStackManager man = dac.ConstructThreadStacks(); VisualStudioProcess vsProc = new VisualStudioProcess(process); r_myControl.Refresh(man, vsProc, threadNames); } } catch (ExpiredException ex) { r_myControl.Refresh(ex); } catch (Exception ex) { r_myControl.Refresh(ex); } }