1248 stack = [] |
1247 stack = [] |
1249 for fn, ln, func, args in stackTrace: |
1248 for fn, ln, func, args in stackTrace: |
1250 stack.append((fn, ln, func, args)) |
1249 stack.append((fn, ln, func, args)) |
1251 self.clientStack.emit(stack, debuggerId) |
1250 self.clientStack.emit(stack, debuggerId) |
1252 self.__getClientVariables(debuggerId) |
1251 self.__getClientVariables(debuggerId) |
|
1252 self.__getClientDisassembly(debuggerId) |
1253 self.ui.setDebugProfile() |
1253 self.ui.setDebugProfile() |
1254 self.debugActGrp.setEnabled(True) |
1254 self.debugActGrp.setEnabled(True) |
1255 return |
1255 return |
1256 elif res == E5MessageBox.Ignore: |
1256 elif res == E5MessageBox.Ignore: |
1257 if exceptionType not in self.excIgnoreList: |
1257 if exceptionType not in self.excIgnoreList: |
1385 self.ui.activateDebugViewer() |
1385 self.ui.activateDebugViewer() |
1386 if scope == 1: |
1386 if scope == 1: |
1387 self.debugViewer.showVariable(variables, True) |
1387 self.debugViewer.showVariable(variables, True) |
1388 elif scope == 0: |
1388 elif scope == 0: |
1389 self.debugViewer.showVariable(variables, False) |
1389 self.debugViewer.showVariable(variables, False) |
1390 |
1390 |
|
1391 def __getClientDisassembly(self, debuggerId): |
|
1392 """ |
|
1393 Private method to ask the client for the latest traceback disassembly. |
|
1394 |
|
1395 @param debuggerId ID of the debugger backend |
|
1396 @type str |
|
1397 """ |
|
1398 self.debugServer.remoteClientDisassembly(debuggerId) |
|
1399 |
1391 def __clientBreakConditionError(self, filename, lineno, debuggerId): |
1400 def __clientBreakConditionError(self, filename, lineno, debuggerId): |
1392 """ |
1401 """ |
1393 Private method to handle a condition error of a breakpoint. |
1402 Private method to handle a condition error of a breakpoint. |
1394 |
1403 |
1395 @param filename filename of the breakpoint |
1404 @param filename filename of the breakpoint |
1420 |
1429 |
1421 from .EditBreakpointDialog import EditBreakpointDialog |
1430 from .EditBreakpointDialog import EditBreakpointDialog |
1422 dlg = EditBreakpointDialog( |
1431 dlg = EditBreakpointDialog( |
1423 (fn, line), (cond, temp, enabled, count), |
1432 (fn, line), (cond, temp, enabled, count), |
1424 [], self.ui, modal=True) |
1433 [], self.ui, modal=True) |
1425 if dlg.exec_() == QDialog.Accepted: |
1434 if dlg.exec() == QDialog.Accepted: |
1426 cond, temp, enabled, count = dlg.getData() |
1435 cond, temp, enabled, count = dlg.getData() |
1427 model.setBreakPointByIndex(index, fn, line, |
1436 model.setBreakPointByIndex(index, fn, line, |
1428 (cond, temp, enabled, count)) |
1437 (cond, temp, enabled, count)) |
1429 |
1438 |
1430 def __clientWatchConditionError(self, cond, debuggerId): |
1439 def __clientWatchConditionError(self, cond, debuggerId): |
1457 cond, special, temp, enabled, count = wp[:5] |
1466 cond, special, temp, enabled, count = wp[:5] |
1458 |
1467 |
1459 from .EditWatchpointDialog import EditWatchpointDialog |
1468 from .EditWatchpointDialog import EditWatchpointDialog |
1460 dlg = EditWatchpointDialog( |
1469 dlg = EditWatchpointDialog( |
1461 (cond, temp, enabled, count, special), self.ui) |
1470 (cond, temp, enabled, count, special), self.ui) |
1462 if dlg.exec_() == QDialog.Accepted: |
1471 if dlg.exec() == QDialog.Accepted: |
1463 cond, temp, enabled, count, special = dlg.getData() |
1472 cond, temp, enabled, count, special = dlg.getData() |
1464 |
1473 |
1465 # check for duplicates |
1474 # check for duplicates |
1466 idx = model.getWatchPointIndex(cond, special) |
1475 idx = model.getWatchPointIndex(cond, special) |
1467 duplicate = (idx.isValid() and |
1476 duplicate = (idx.isValid() and |
1492 Private slot for displaying the variables filter configuration dialog. |
1501 Private slot for displaying the variables filter configuration dialog. |
1493 """ |
1502 """ |
1494 from .VariablesFilterDialog import VariablesFilterDialog |
1503 from .VariablesFilterDialog import VariablesFilterDialog |
1495 dlg = VariablesFilterDialog(self.ui, 'Filter Dialog', True) |
1504 dlg = VariablesFilterDialog(self.ui, 'Filter Dialog', True) |
1496 dlg.setSelection(self.localsVarFilter, self.globalsVarFilter) |
1505 dlg.setSelection(self.localsVarFilter, self.globalsVarFilter) |
1497 if dlg.exec_() == QDialog.Accepted: |
1506 if dlg.exec() == QDialog.Accepted: |
1498 self.localsVarFilter, self.globalsVarFilter = dlg.getSelection() |
1507 self.localsVarFilter, self.globalsVarFilter = dlg.getSelection() |
1499 self.debugViewer.setVariablesFilter( |
1508 self.debugViewer.setVariablesFilter( |
1500 self.globalsVarFilter, self.localsVarFilter) |
1509 self.globalsVarFilter, self.localsVarFilter) |
1501 |
1510 |
1502 def __configureExceptionsFilter(self): |
1511 def __configureExceptionsFilter(self): |
1503 """ |
1512 """ |
1504 Private slot for displaying the exception filter dialog. |
1513 Private slot for displaying the exception filter dialog. |
1505 """ |
1514 """ |
1506 from .ExceptionsFilterDialog import ExceptionsFilterDialog |
1515 from .ExceptionsFilterDialog import ExceptionsFilterDialog |
1507 dlg = ExceptionsFilterDialog(self.excList, ignore=False) |
1516 dlg = ExceptionsFilterDialog(self.excList, ignore=False) |
1508 if dlg.exec_() == QDialog.Accepted: |
1517 if dlg.exec() == QDialog.Accepted: |
1509 self.excList = dlg.getExceptionsList()[:] # keep a copy |
1518 self.excList = dlg.getExceptionsList()[:] # keep a copy |
1510 |
1519 |
1511 def __configureIgnoredExceptions(self): |
1520 def __configureIgnoredExceptions(self): |
1512 """ |
1521 """ |
1513 Private slot for displaying the ignored exceptions dialog. |
1522 Private slot for displaying the ignored exceptions dialog. |
1514 """ |
1523 """ |
1515 from .ExceptionsFilterDialog import ExceptionsFilterDialog |
1524 from .ExceptionsFilterDialog import ExceptionsFilterDialog |
1516 dlg = ExceptionsFilterDialog(self.excIgnoreList, ignore=True) |
1525 dlg = ExceptionsFilterDialog(self.excIgnoreList, ignore=True) |
1517 if dlg.exec_() == QDialog.Accepted: |
1526 if dlg.exec() == QDialog.Accepted: |
1518 self.excIgnoreList = dlg.getExceptionsList()[:] # keep a copy |
1527 self.excIgnoreList = dlg.getExceptionsList()[:] # keep a copy |
1519 |
1528 |
1520 def __toggleBreakpoint(self): |
1529 def __toggleBreakpoint(self): |
1521 """ |
1530 """ |
1522 Private slot to handle the 'Set/Reset breakpoint' action. |
1531 Private slot to handle the 'Set/Reset breakpoint' action. |
1634 cap = self.tr("Coverage of Script") |
1643 cap = self.tr("Coverage of Script") |
1635 dlg = StartDialog( |
1644 dlg = StartDialog( |
1636 cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, |
1645 cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, |
1637 self.envHistory, self.exceptions, self.ui, 2, |
1646 self.envHistory, self.exceptions, self.ui, 2, |
1638 autoClearShell=self.autoClearShell) |
1647 autoClearShell=self.autoClearShell) |
1639 if dlg.exec_() == QDialog.Accepted: |
1648 if dlg.exec() == QDialog.Accepted: |
1640 (lastUsedVenvName, argv, wd, env, exceptions, clearShell, |
1649 (lastUsedVenvName, argv, wd, env, exceptions, clearShell, |
1641 console) = dlg.getData() |
1650 console) = dlg.getData() |
1642 eraseCoverage = dlg.getCoverageData() |
1651 eraseCoverage = dlg.getCoverageData() |
1643 |
1652 |
1644 if runProject: |
1653 if runProject: |
1770 cap = self.tr("Profile of Script") |
1779 cap = self.tr("Profile of Script") |
1771 dlg = StartDialog( |
1780 dlg = StartDialog( |
1772 cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, |
1781 cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, |
1773 self.envHistory, self.exceptions, self.ui, 3, |
1782 self.envHistory, self.exceptions, self.ui, 3, |
1774 autoClearShell=self.autoClearShell) |
1783 autoClearShell=self.autoClearShell) |
1775 if dlg.exec_() == QDialog.Accepted: |
1784 if dlg.exec() == QDialog.Accepted: |
1776 (lastUsedVenvName, argv, wd, env, exceptions, clearShell, |
1785 (lastUsedVenvName, argv, wd, env, exceptions, clearShell, |
1777 console) = dlg.getData() |
1786 console) = dlg.getData() |
1778 eraseTimings = dlg.getProfilingData() |
1787 eraseTimings = dlg.getProfilingData() |
1779 |
1788 |
1780 if runProject: |
1789 if runProject: |
1908 cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, |
1917 cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, |
1909 self.envHistory, self.exceptions, self.ui, 1, |
1918 self.envHistory, self.exceptions, self.ui, 1, |
1910 autoClearShell=self.autoClearShell, |
1919 autoClearShell=self.autoClearShell, |
1911 autoFork=self.forkAutomatically, |
1920 autoFork=self.forkAutomatically, |
1912 forkChild=self.forkIntoChild) |
1921 forkChild=self.forkIntoChild) |
1913 if dlg.exec_() == QDialog.Accepted: |
1922 if dlg.exec() == QDialog.Accepted: |
1914 (lastUsedVenvName, argv, wd, env, exceptions, clearShell, |
1923 (lastUsedVenvName, argv, wd, env, exceptions, clearShell, |
1915 console) = dlg.getData() |
1924 console) = dlg.getData() |
1916 forkAutomatically, forkIntoChild = dlg.getRunData() |
1925 forkAutomatically, forkIntoChild = dlg.getRunData() |
1917 |
1926 |
1918 if runProject: |
1927 if runProject: |
2050 tracePython=self.tracePython, autoClearShell=self.autoClearShell, |
2059 tracePython=self.tracePython, autoClearShell=self.autoClearShell, |
2051 autoContinue=self.autoContinue, autoFork=self.forkAutomatically, |
2060 autoContinue=self.autoContinue, autoFork=self.forkAutomatically, |
2052 forkChild=self.forkIntoChild, |
2061 forkChild=self.forkIntoChild, |
2053 enableMultiprocess=self.enableMultiprocess, |
2062 enableMultiprocess=self.enableMultiprocess, |
2054 multiprocessNoDebugHistory=self.multiprocessNoDebugHistory) |
2063 multiprocessNoDebugHistory=self.multiprocessNoDebugHistory) |
2055 if dlg.exec_() == QDialog.Accepted: |
2064 if dlg.exec() == QDialog.Accepted: |
2056 (lastUsedVenvName, argv, wd, env, exceptions, clearShell, |
2065 (lastUsedVenvName, argv, wd, env, exceptions, clearShell, |
2057 console) = dlg.getData() |
2066 console) = dlg.getData() |
2058 (tracePython, autoContinue, forkAutomatically, forkIntoChild, |
2067 (tracePython, autoContinue, forkAutomatically, forkIntoChild, |
2059 enableMultiprocess, multiprocessNoDebug, |
2068 enableMultiprocess, multiprocessNoDebug, |
2060 ) = dlg.getDebugData() |
2069 ) = dlg.getDebugData() |