503 self.vcsRequested = False |
503 self.vcsRequested = False |
504 self.dbgVirtualEnv = "" |
504 self.dbgVirtualEnv = "" |
505 self.dbgCmdline = "" |
505 self.dbgCmdline = "" |
506 self.dbgWd = "" |
506 self.dbgWd = "" |
507 self.dbgEnv = "" |
507 self.dbgEnv = "" |
508 self.dbgReportExceptions = True |
|
509 self.dbgExcList = [] |
508 self.dbgExcList = [] |
510 self.dbgExcIgnoreList = [] |
509 self.dbgExcIgnoreList = [] |
511 self.dbgAutoClearShell = True |
510 self.dbgAutoClearShell = True |
512 self.dbgTracePython = False |
511 self.dbgTracePython = False |
513 self.dbgAutoContinue = True |
512 self.dbgAutoContinue = True |
|
513 self.dbgReportAllExceptions = False |
514 self.dbgEnableMultiprocess = True |
514 self.dbgEnableMultiprocess = True |
515 self.dbgMultiprocessNoDebug = "" |
515 self.dbgMultiprocessNoDebug = "" |
516 self.dbgGlobalConfigOverride = { |
516 self.dbgGlobalConfigOverride = { |
517 "enable": False, |
517 "enable": False, |
518 "redirect": True, |
518 "redirect": True, |
710 @return list of known file categories |
710 @return list of known file categories |
711 @rtype list of str |
711 @rtype list of str |
712 """ |
712 """ |
713 return list(self.__fileCategoriesRepository.keys()) |
713 return list(self.__fileCategoriesRepository.keys()) |
714 |
714 |
715 def getFileCategoryFilters( |
715 def getFileCategoryFilters(self, categories=None, withOthers=False, withAll=True): |
716 self, categories=None, withOthers=False, withAll=True |
|
717 ): |
|
718 """ |
716 """ |
719 Public method to get a list of file selection filters for the given categories. |
717 Public method to get a list of file selection filters for the given categories. |
720 |
718 |
721 @param categories list of file type categories (defaults to None). |
719 @param categories list of file type categories (defaults to None). |
722 A value of None means all categories except 'OTHERS'. |
720 A value of None means all categories except 'OTHERS'. |
773 @return file selection filter string |
771 @return file selection filter string |
774 @rtype str |
772 @rtype str |
775 """ |
773 """ |
776 return ";;".join( |
774 return ";;".join( |
777 self.getFileCategoryFilters( |
775 self.getFileCategoryFilters( |
778 categ=categories, withOthers=withOthers, withAll=withAll |
776 categories=categories, withOthers=withOthers, withAll=withAll |
779 ) |
777 ) |
780 ) |
778 ) |
781 |
779 |
782 def getFileCategoryString(self, category): |
780 def getFileCategoryString(self, category): |
783 """ |
781 """ |
1561 "ENVIRONMENTOVERRIDE": False, |
1559 "ENVIRONMENTOVERRIDE": False, |
1562 "ENVIRONMENTSTRING": "", |
1560 "ENVIRONMENTSTRING": "", |
1563 "REMOTEDEBUGGER": False, |
1561 "REMOTEDEBUGGER": False, |
1564 "REMOTEHOST": "", |
1562 "REMOTEHOST": "", |
1565 "REMOTECOMMAND": "", |
1563 "REMOTECOMMAND": "", |
|
1564 "REMOTEDEBUGCLIENT": "", |
1566 "PATHTRANSLATION": False, |
1565 "PATHTRANSLATION": False, |
1567 "REMOTEPATH": "", |
1566 "REMOTEPATH": "", |
1568 "LOCALPATH": "", |
1567 "LOCALPATH": "", |
1569 "CONSOLEDEBUGGER": False, |
1568 "CONSOLEDEBUGGER": False, |
1570 "CONSOLECOMMAND": "", |
1569 "CONSOLECOMMAND": "", |
1631 @type str |
1630 @type str |
1632 @param wd working directory |
1631 @param wd working directory |
1633 @type str |
1632 @type str |
1634 @param env environment setting |
1633 @param env environment setting |
1635 @type str |
1634 @type str |
1636 @param excReporting flag indicating the highlighting of exceptions |
|
1637 @type bool |
|
1638 @param excList list of exceptions to be highlighted |
1635 @param excList list of exceptions to be highlighted |
1639 @type list of str |
1636 @type list of str |
1640 @param excIgnoreList list of exceptions to be ignored |
1637 @param excIgnoreList list of exceptions to be ignored |
1641 @type list of str |
1638 @type list of str |
1642 @param autoClearShell flag indicating, that the interpreter window |
1639 @param autoClearShell flag indicating, that the interpreter window |
1646 traced as well |
1643 traced as well |
1647 @type bool |
1644 @type bool |
1648 @param autoContinue flag indicating, that the debugger should not |
1645 @param autoContinue flag indicating, that the debugger should not |
1649 stop at the first executable line |
1646 stop at the first executable line |
1650 @type bool |
1647 @type bool |
|
1648 @param reportAllExceptions flag indicating to report all exceptions |
|
1649 instead of unhandled exceptions only |
|
1650 @type bool |
1651 @param enableMultiprocess flag indicating, that the debugger should |
1651 @param enableMultiprocess flag indicating, that the debugger should |
1652 run in multi process mode |
1652 run in multi process mode |
1653 @type bool |
1653 @type bool |
1654 @param multiprocessNoDebug list of programs not to be debugged in |
1654 @param multiprocessNoDebug list of programs not to be debugged in |
1655 multi process mode |
1655 multi process mode |
1660 """ |
1660 """ |
1661 self.dbgVirtualEnv = venvName |
1661 self.dbgVirtualEnv = venvName |
1662 self.dbgCmdline = argv |
1662 self.dbgCmdline = argv |
1663 self.dbgWd = wd |
1663 self.dbgWd = wd |
1664 self.dbgEnv = env |
1664 self.dbgEnv = env |
1665 self.dbgReportExceptions = excReporting |
|
1666 self.dbgExcList = excList[:] # keep a copy of the list |
1665 self.dbgExcList = excList[:] # keep a copy of the list |
1667 self.dbgExcIgnoreList = excIgnoreList[:] # keep a copy of the list |
1666 self.dbgExcIgnoreList = excIgnoreList[:] # keep a copy of the list |
1668 self.dbgAutoClearShell = autoClearShell |
1667 self.dbgAutoClearShell = autoClearShell |
1669 if tracePython is not None: |
1668 if tracePython is not None: |
1670 self.dbgTracePython = tracePython |
1669 self.dbgTracePython = tracePython |
1671 if autoContinue is not None: |
1670 if autoContinue is not None: |
1672 self.dbgAutoContinue = autoContinue |
1671 self.dbgAutoContinue = autoContinue |
|
1672 if reportAllExceptions is not None: |
|
1673 self.dbgReportAllExceptions = reportAllExceptions |
1673 if enableMultiprocess is not None: |
1674 if enableMultiprocess is not None: |
1674 self.dbgEnableMultiprocess = enableMultiprocess |
1675 self.dbgEnableMultiprocess = enableMultiprocess |
1675 if multiprocessNoDebug is not None: |
1676 if multiprocessNoDebug is not None: |
1676 self.dbgMultiprocessNoDebug = multiprocessNoDebug |
1677 self.dbgMultiprocessNoDebug = multiprocessNoDebug |
1677 if configOverride is not None: |
1678 if configOverride is not None: |
6514 ) |
6515 ) |
6515 return "" |
6516 return "" |
6516 |
6517 |
6517 for sourceline in sourcelines: |
6518 for sourceline in sourcelines: |
6518 if sourceline.startswith("version = "): |
6519 if sourceline.startswith("version = "): |
|
6520 # old variant of plugin header |
6519 version = ( |
6521 version = ( |
6520 sourceline.replace("version = ", "") |
6522 sourceline.replace("version = ", "") |
6521 .strip() |
6523 .strip() |
6522 .replace('"', "") |
6524 .replace('"', "") |
6523 .replace("'", "") |
6525 .replace("'", "") |
|
6526 ) |
|
6527 break |
|
6528 elif sourceline.strip().startswith(('"version":', "'version':")): |
|
6529 # new variant of plugin header |
|
6530 version = ( |
|
6531 sourceline.replace('"version":', "") |
|
6532 .replace("'version':", "") |
|
6533 .replace('"', "") |
|
6534 .replace("'", "") |
|
6535 .replace(",", "") |
|
6536 .strip() |
6524 ) |
6537 ) |
6525 break |
6538 break |
6526 |
6539 |
6527 return version |
6540 return version |
6528 |
6541 |
7117 |
7130 |
7118 if not os.path.isfile( |
7131 if not os.path.isfile( |
7119 self.__venvConfiguration["interpreter"] |
7132 self.__venvConfiguration["interpreter"] |
7120 ) or not os.access(self.__venvConfiguration["interpreter"], os.X_OK): |
7133 ) or not os.access(self.__venvConfiguration["interpreter"], os.X_OK): |
7121 self.__venvConfiguration["interpreter"] = "" |
7134 self.__venvConfiguration["interpreter"] = "" |
|
7135 upgrade = EricMessageBox.yesNo( |
|
7136 None, |
|
7137 self.tr("Interpreter Missing"), |
|
7138 self.tr( |
|
7139 "The configured interpreter of the embedded environment does" |
|
7140 " not exist anymore. Shall the environment be upgraded?" |
|
7141 ), |
|
7142 yesDefault=True, |
|
7143 ) |
|
7144 if upgrade: |
|
7145 self.__createEmbeddedEnvironment(upgrade=True) |
7122 except (OSError, json.JSONDecodeError): |
7146 except (OSError, json.JSONDecodeError): |
7123 # the configuration file does not exist or is invalid JSON |
7147 # the configuration file does not exist or is invalid JSON |
7124 self.__initVenvConfiguration() |
7148 self.__initVenvConfiguration() |
7125 |
7149 |
7126 |
7150 |