Reputation: 98
Two questions regarding NBug:
Can the NBug.config file be omitted if I'm having the configuration in the code like this:
static void Main()
{
//NBug Crash Handling
NBug.Settings.ReleaseMode = true;
NBug.Settings.MiniDumpType = NBug.Enums.MiniDumpType.Normal;
NBug.Settings.StopReportingAfter = 365;
NBug.Settings.WriteLogToDisk = true;
NBug.Settings.ExitApplicationImmediately = true;
NBug.Settings.StoragePath = "WindowsTemp";
AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException;
Application.ThreadException += NBug.Handler.ThreadException;
[...]
}
Why is this part of code never executed after a crash dump was created and the app restarted?
public MainMenu()
{
InitializeComponent();
//add handler on application load
NBug.Settings.CustomSubmissionEvent += Settings_CustomSubmissionEvent;
// Custom Submission Event handler
void Settings_CustomSubmissionEvent(object sender, CustomSubmissionEventArgs e)
{
//your sumbmission code here...
MessageBox.Show(e.FileName.ToString());
//.....
//tell NBug if submission was successfull or not
e.Result = true;
}
[...]
}
Upvotes: 1
Views: 504
Reputation: 25742
If you're using nuget package, it's outdated so might not work.
Upvotes: 1