Browse Source

ExceptionBox is not used if #D is started under debugger

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@98 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
a1aaf01a8a
  1. 16
      src/Main/StartUp/Project/SharpDevelopMain.cs

16
src/Main/StartUp/Project/SharpDevelopMain.cs

@ -83,11 +83,15 @@ namespace ICSharpCode.SharpDevelop @@ -83,11 +83,15 @@ namespace ICSharpCode.SharpDevelop
[STAThread()]
public static void Main(string[] args)
{
try {
if (Debugger.IsAttached) {
Run(args);
} catch (Exception ex) {
Console.WriteLine(ex);
Application.Run(new ExceptionBox(ex));
} else {
try {
Run(args);
} catch (Exception ex) {
Console.WriteLine(ex);
Application.Run(new ExceptionBox(ex));
}
}
}
@ -110,7 +114,9 @@ namespace ICSharpCode.SharpDevelop @@ -110,7 +114,9 @@ namespace ICSharpCode.SharpDevelop
SplashScreenForm.SplashScreen.Show();
}
Application.ThreadException += new ThreadExceptionEventHandler(ShowErrorBox);
if (!Debugger.IsAttached) {
Application.ThreadException += new ThreadExceptionEventHandler(ShowErrorBox);
}
// TODO:
// bool ignoreDefaultPath = false;

Loading…
Cancel
Save