973 Preferences.Prefs.settings.setValue( |
975 Preferences.Prefs.settings.setValue( |
974 'DebugInfo/EnvironmentHistory', self.envHistory) |
976 'DebugInfo/EnvironmentHistory', self.envHistory) |
975 Preferences.Prefs.settings.setValue( |
977 Preferences.Prefs.settings.setValue( |
976 'DebugInfo/MultiprocessNoDebugHistory', |
978 'DebugInfo/MultiprocessNoDebugHistory', |
977 self.multiprocessNoDebugHistory) |
979 self.multiprocessNoDebugHistory) |
|
980 |
|
981 self.debugViewer.breakpointViewer.clearHistories() |
978 |
982 |
979 def shutdown(self): |
983 def shutdown(self): |
980 """ |
984 """ |
981 Public method to perform shutdown actions. |
985 Public method to perform shutdown actions. |
982 """ |
986 """ |
1477 if not bp: |
1481 if not bp: |
1478 return |
1482 return |
1479 |
1483 |
1480 fn, line, cond, temp, enabled, count = bp[:6] |
1484 fn, line, cond, temp, enabled, count = bp[:6] |
1481 |
1485 |
|
1486 # get recently used breakpoint conditions |
|
1487 rs = Preferences.Prefs.rsettings.value( |
|
1488 recentNameBreakpointConditions) |
|
1489 condHistory = ( |
|
1490 Preferences.toList(rs)[ |
|
1491 :Preferences.getDebugger("RecentNumber")] |
|
1492 if rs is not None else |
|
1493 [] |
|
1494 ) |
|
1495 |
1482 from .EditBreakpointDialog import EditBreakpointDialog |
1496 from .EditBreakpointDialog import EditBreakpointDialog |
1483 dlg = EditBreakpointDialog( |
1497 dlg = EditBreakpointDialog( |
1484 (fn, line), (cond, temp, enabled, count), |
1498 (fn, line), (cond, temp, enabled, count), |
1485 [], self.ui, modal=True) |
1499 condHistory, self.ui, modal=True) |
1486 if dlg.exec() == QDialog.DialogCode.Accepted: |
1500 if dlg.exec() == QDialog.DialogCode.Accepted: |
1487 cond, temp, enabled, count = dlg.getData() |
1501 cond, temp, enabled, count = dlg.getData() |
1488 model.setBreakPointByIndex(index, fn, line, |
1502 model.setBreakPointByIndex(index, fn, line, |
1489 (cond, temp, enabled, count)) |
1503 (cond, temp, enabled, count)) |
|
1504 |
|
1505 if cond: |
|
1506 # save the recently used breakpoint condition |
|
1507 if cond in condHistory: |
|
1508 condHistory.remove(cond) |
|
1509 condHistory.insert(0, cond) |
|
1510 Preferences.Prefs.rsettings.setValue( |
|
1511 recentNameBreakpointConditions, condHistory) |
|
1512 Preferences.Prefs.rsettings.sync() |
1490 |
1513 |
1491 def __clientWatchConditionError(self, cond, debuggerId): |
1514 def __clientWatchConditionError(self, cond, debuggerId): |
1492 """ |
1515 """ |
1493 Private method to handle a expression error of a watch expression. |
1516 Private method to handle a expression error of a watch expression. |
1494 |
1517 |