102 |
102 |
103 self.evalHistory = [] |
103 self.evalHistory = [] |
104 self.execHistory = [] |
104 self.execHistory = [] |
105 self.lastDebuggedFile = None |
105 self.lastDebuggedFile = None |
106 self.lastStartAction = 0 # 0=None, 1=Script, 2=Project |
106 self.lastStartAction = 0 # 0=None, 1=Script, 2=Project |
|
107 self.clientType = "" |
107 self.lastAction = -1 |
108 self.lastAction = -1 |
108 self.debugActions = [self.__continue, self.__step,\ |
109 self.debugActions = [self.__continue, self.__step,\ |
109 self.__stepOver, self.__stepOut,\ |
110 self.__stepOver, self.__stepOut,\ |
110 self.__stepQuit, self.__runToCursor] |
111 self.__stepQuit, self.__runToCursor] |
111 self.localsVarFilter, self.globalsVarFilter = Preferences.getVarFilters() |
112 self.localsVarFilter, self.globalsVarFilter = Preferences.getVarFilters() |
1420 fn = os.path.join(getConfig('ericDir'), "eric5.py") |
1425 fn = os.path.join(getConfig('ericDir'), "eric5.py") |
1421 |
1426 |
1422 # Ask the client to open the new program. |
1427 # Ask the client to open the new program. |
1423 self.debugServer.remoteCoverage(fn, argv, wd, env, |
1428 self.debugServer.remoteCoverage(fn, argv, wd, env, |
1424 autoClearShell = self.autoClearShell, erase = eraseCoverage, |
1429 autoClearShell = self.autoClearShell, erase = eraseCoverage, |
1425 forProject = runProject, runInConsole = console) |
1430 forProject = runProject, runInConsole = console, |
|
1431 clientType = self.clientType) |
1426 |
1432 |
1427 self.stopAct.setEnabled(True) |
1433 self.stopAct.setEnabled(True) |
1428 |
1434 |
1429 def __profileScript(self): |
1435 def __profileScript(self): |
1430 """ |
1436 """ |
1524 fn = os.path.join(getConfig('ericDir'), "eric5.py") |
1532 fn = os.path.join(getConfig('ericDir'), "eric5.py") |
1525 |
1533 |
1526 # Ask the client to open the new program. |
1534 # Ask the client to open the new program. |
1527 self.debugServer.remoteProfile(fn, argv, wd, env, |
1535 self.debugServer.remoteProfile(fn, argv, wd, env, |
1528 autoClearShell = self.autoClearShell, erase = eraseTimings, |
1536 autoClearShell = self.autoClearShell, erase = eraseTimings, |
1529 forProject = runProject, runInConsole = console) |
1537 forProject = runProject, runInConsole = console, |
|
1538 clientType = self.clientType) |
1530 |
1539 |
1531 self.stopAct.setEnabled(True) |
1540 self.stopAct.setEnabled(True) |
1532 |
1541 |
1533 def __runScript(self): |
1542 def __runScript(self): |
1534 """ |
1543 """ |
1632 |
1643 |
1633 # Ask the client to open the new program. |
1644 # Ask the client to open the new program. |
1634 self.debugServer.remoteRun(fn, argv, wd, env, |
1645 self.debugServer.remoteRun(fn, argv, wd, env, |
1635 autoClearShell = self.autoClearShell, forProject = runProject, |
1646 autoClearShell = self.autoClearShell, forProject = runProject, |
1636 runInConsole = console, autoFork = forkAutomatically, |
1647 runInConsole = console, autoFork = forkAutomatically, |
1637 forkChild = forkIntoChild) |
1648 forkChild = forkIntoChild, clientType = self.clientType) |
1638 |
1649 |
1639 self.stopAct.setEnabled(True) |
1650 self.stopAct.setEnabled(True) |
1640 |
1651 |
1641 def __debugScript(self): |
1652 def __debugScript(self): |
1642 """ |
1653 """ |
1749 # Ask the client to open the new program. |
1762 # Ask the client to open the new program. |
1750 self.debugServer.remoteLoad(fn, argv, wd, env, |
1763 self.debugServer.remoteLoad(fn, argv, wd, env, |
1751 autoClearShell = self.autoClearShell, tracePython = tracePython, |
1764 autoClearShell = self.autoClearShell, tracePython = tracePython, |
1752 autoContinue = autoContinue, forProject = debugProject, |
1765 autoContinue = autoContinue, forProject = debugProject, |
1753 runInConsole = console, autoFork = forkAutomatically, |
1766 runInConsole = console, autoFork = forkAutomatically, |
1754 forkChild = forkIntoChild) |
1767 forkChild = forkIntoChild, clientType = self.clientType) |
1755 |
1768 |
1756 # Signal that we have started a debugging session |
1769 # Signal that we have started a debugging session |
1757 self.debuggingStarted.emit(fn) |
1770 self.debuggingStarted.emit(fn) |
1758 |
1771 |
1759 self.stopAct.setEnabled(True) |
1772 self.stopAct.setEnabled(True) |
1800 # Ask the client to debug the new program. |
1813 # Ask the client to debug the new program. |
1801 self.debugServer.remoteLoad(fn, argv, wd, env, |
1814 self.debugServer.remoteLoad(fn, argv, wd, env, |
1802 autoClearShell = self.autoClearShell, tracePython = self.tracePython, |
1815 autoClearShell = self.autoClearShell, tracePython = self.tracePython, |
1803 autoContinue = self.autoContinue, forProject = forProject, |
1816 autoContinue = self.autoContinue, forProject = forProject, |
1804 runInConsole = self.runInConsole, autoFork = self.forkAutomatically, |
1817 runInConsole = self.runInConsole, autoFork = self.forkAutomatically, |
1805 forkChild = self.forkIntoChild) |
1818 forkChild = self.forkIntoChild, clientType = self.clientType) |
1806 |
1819 |
1807 # Signal that we have started a debugging session |
1820 # Signal that we have started a debugging session |
1808 self.debuggingStarted.emit(fn) |
1821 self.debuggingStarted.emit(fn) |
1809 |
1822 |
1810 elif self.lastStartAction in [3, 4]: |
1823 elif self.lastStartAction in [3, 4]: |
1811 # Ask the client to run the new program. |
1824 # Ask the client to run the new program. |
1812 self.debugServer.remoteRun(fn, argv, wd, env, |
1825 self.debugServer.remoteRun(fn, argv, wd, env, |
1813 autoClearShell = self.autoClearShell, forProject = forProject, |
1826 autoClearShell = self.autoClearShell, forProject = forProject, |
1814 runInConsole = self.runInConsole, autoFork = self.forkAutomatically, |
1827 runInConsole = self.runInConsole, autoFork = self.forkAutomatically, |
1815 forkChild = self.forkIntoChild) |
1828 forkChild = self.forkIntoChild, clientType = self.clientType) |
1816 |
1829 |
1817 elif self.lastStartAction in [5, 6]: |
1830 elif self.lastStartAction in [5, 6]: |
1818 # Ask the client to coverage run the new program. |
1831 # Ask the client to coverage run the new program. |
1819 self.debugServer.remoteCoverage(fn, argv, wd, env, |
1832 self.debugServer.remoteCoverage(fn, argv, wd, env, |
1820 autoClearShell = self.autoClearShell, erase = self.eraseCoverage, |
1833 autoClearShell = self.autoClearShell, erase = self.eraseCoverage, |
1821 forProject = forProject, runInConsole = self.runInConsole) |
1834 forProject = forProject, runInConsole = self.runInConsole, |
|
1835 clientType = self.clientType) |
1822 |
1836 |
1823 elif self.lastStartAction in [7, 8]: |
1837 elif self.lastStartAction in [7, 8]: |
1824 # Ask the client to profile run the new program. |
1838 # Ask the client to profile run the new program. |
1825 self.debugServer.remoteProfile(fn, argv, wd, env, |
1839 self.debugServer.remoteProfile(fn, argv, wd, env, |
1826 autoClearShell = self.autoClearShell, erase = self.eraseTimings, |
1840 autoClearShell = self.autoClearShell, erase = self.eraseTimings, |
1827 forProject = forProject, runInConsole = self.runInConsole) |
1841 forProject = forProject, runInConsole = self.runInConsole, |
|
1842 clientType = self.clientType) |
1828 |
1843 |
1829 self.stopAct.setEnabled(True) |
1844 self.stopAct.setEnabled(True) |
1830 |
1845 |
1831 def __stopScript(self): |
1846 def __stopScript(self): |
1832 """ |
1847 """ |