diff --git a/pkNX.WinForms/UI/MainWindow.xaml.cs b/pkNX.WinForms/UI/MainWindow.xaml.cs index 64b519c1..2d3eef24 100644 --- a/pkNX.WinForms/UI/MainWindow.xaml.cs +++ b/pkNX.WinForms/UI/MainWindow.xaml.cs @@ -145,6 +145,10 @@ private void OpenPath(string path, GameVersion gameOverride = GameVersion.Any) } catch (Exception ex) { + // Rethrow to have a better debugging experience + if (Debugger.IsAttached) + throw; + WinFormsUtil.Error($"Failed to open -- {path}", ex.Message); } } @@ -197,6 +201,10 @@ private void OpenFolder(string path, GameVersion gameOverride) } catch (Exception ex) { + // Rethrow to have a better debugging experience + if (Debugger.IsAttached) + throw; + var msg = "Failed to initialize ROM data." + Environment.NewLine + "Please ensure your dump is correctly set up, with updated patches merged in (if applicable)."; var stack = ex.StackTrace ?? string.Empty;