public override void Execute(object parameter) { if (!CurrentDebugger.IsDebugging) { var settings = ILSpySettings.Load(); XElement e = settings["DebuggerSettings"]; var showWarnings = (bool?)e.Attribute("showWarnings"); if ((showWarnings.HasValue && showWarnings.Value) || !showWarnings.HasValue) MessageBox.Show("Warning: When attaching to an application, some local variables might not be available. If possible, use the \"Start Executable\" command.", "Attach to a process", MessageBoxButton.OK, MessageBoxImage.Warning); var window = new AttachToProcessWindow { Owner = MainWindow.Instance }; if (window.ShowDialog() == true) { StartAttaching(window.SelectedProcess); } } }
public override void Execute(object parameter) { if (!CurrentDebugger.IsDebugging) { if (DebuggerSettings.Instance.ShowWarnings) MessageBox.Show("警告:附加到进程时, 一些局部变量可能无法查看. 如果可能, 请使用'调试可执行文件'.", "附加到进程", MessageBoxButton.OK, MessageBoxImage.Warning); var window = new AttachToProcessWindow { Owner = MainWindow.Instance }; if (window.ShowDialog() == true) { StartAttaching(window.SelectedProcess); } } }
public static bool Attach() { if (DebuggerService.CurrentDebugger == null || DebuggerService.CurrentDebugger.IsDebugging) return false; MainWindow.Instance.ShowIgnorableMessageBox("debug: attach warning", "Warning: When attaching to an application, some local variables might not be available. If possible, use the \"Debug an Executable\" command.", MessageBoxButton.OK); var window = new AttachToProcessWindow { Owner = MainWindow.Instance }; if (window.ShowDialog() == true) { DebuggerPlugin.StartAttaching(window.SelectedProcess); return true; } return false; }
public override void Execute(object parameter) { if (!CurrentDebugger.IsDebugging) { if (DebuggerSettings.Instance.ShowWarnings) MessageBox.Show("Warning: When attaching to an application, some local variables might not be available. If possible, use the \"Start Executable\" command.", "Attach to a process", MessageBoxButton.OK, MessageBoxImage.Warning); var window = new AttachToProcessWindow { Owner = MainWindow.Instance }; if (window.ShowDialog() == true) { StartAttaching(window.SelectedProcess); } } }