1
0
Fork 0

Add "Ignore First-Chance" button to ignore all exceptions

This commit is contained in:
torusrxxx 2022-03-17 23:27:00 +08:00
parent a6313b45f5
commit 05cf6a2b0d
No known key found for this signature in database
GPG Key ID: A795C73A0F1CFADD
3 changed files with 27 additions and 0 deletions

View File

@ -910,6 +910,22 @@ void SettingsDialog::on_btnIgnoreLast_clicked()
AddExceptionFilterToList(filter);
}
// Shortcut to ignore all first chance exceptions and don't log
void SettingsDialog::on_btnIgnoreFirst_clicked()
{
for(int i = 0; i < settings.exceptionFilters->size(); i++)
{
ExceptionFilter & filter = (*settings.exceptionFilters)[i];
if(filter.range.start == 0 && filter.range.end == 0)
{
filter.breakOn = ExceptionBreakOn::SecondChance;
filter.handledBy = ExceptionHandledBy::Debuggee;
filter.logException = false;
}
}
UpdateExceptionListWidget();
}
void SettingsDialog::on_listExceptions_currentItemChanged(QListWidgetItem* current, QListWidgetItem*)
{
OnExceptionFilterSelectionChanged(current);

View File

@ -69,6 +69,7 @@ private slots:
void on_btnIgnoreRange_clicked();
void on_btnDeleteRange_clicked();
void on_btnIgnoreLast_clicked();
void on_btnIgnoreFirst_clicked();
void on_listExceptions_currentItemChanged(QListWidgetItem* current, QListWidgetItem* previous);
void on_listExceptions_itemClicked(QListWidgetItem* item);
void on_radioFirstChance_clicked();

View File

@ -523,6 +523,16 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnIgnoreFirst">
<property name="toolTip">
<string>Ignore all first-chance exceptions, don't print log, pass them to the debuggee and only break on second-chance exceptions.</string>
</property>
<property name="text">
<string>Ignore First-Chance</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBoBreakOn">
<property name="sizePolicy">