475 if self.debuggerInterface and self.debuggerInterface.isConnected(): |
475 if self.debuggerInterface and self.debuggerInterface.isConnected(): |
476 self.shutdownServer() |
476 self.shutdownServer() |
477 self.clientGone.emit(unplanned and self.debugging) |
477 self.clientGone.emit(unplanned and self.debugging) |
478 |
478 |
479 if clType: |
479 if clType: |
|
480 if clType not in self.getSupportedLanguages(): |
|
481 # a not supported client language was requested |
|
482 return |
|
483 |
480 self.__setClientType(clType) |
484 self.__setClientType(clType) |
481 |
485 |
482 # only start the client, if we are not in passive mode |
486 # only start the client, if we are not in passive mode |
483 if not self.passive: |
487 if not self.passive: |
484 if self.clientProcess: |
488 if self.clientProcess: |
739 Public method to get the interpreter of the debug client. |
743 Public method to get the interpreter of the debug client. |
740 |
744 |
741 @return interpreter of the debug client (string) |
745 @return interpreter of the debug client (string) |
742 """ |
746 """ |
743 return self.clientInterpreter |
747 return self.clientInterpreter |
744 |
748 |
|
749 def getClientType(self): |
|
750 """ |
|
751 Public method to get the currently running debug client type. |
|
752 |
|
753 @return debug client type |
|
754 @rtype str |
|
755 """ |
|
756 return self.clientType |
|
757 |
|
758 def isClientProcessUp(self): |
|
759 """ |
|
760 Public method to check, if the debug client process is up. |
|
761 |
|
762 @return flag indicating a running debug client process |
|
763 @rtype bool |
|
764 """ |
|
765 return self.clientProcess is not None |
|
766 |
745 def __newConnection(self): |
767 def __newConnection(self): |
746 """ |
768 """ |
747 Private slot to handle a new connection. |
769 Private slot to handle a new connection. |
748 """ |
770 """ |
749 sock = self.nextPendingConnection() |
771 sock = self.nextPendingConnection() |
854 @type bool |
876 @type bool |
855 """ |
877 """ |
856 self.__autoClearShell = autoClearShell |
878 self.__autoClearShell = autoClearShell |
857 self.__autoContinue = autoContinue |
879 self.__autoContinue = autoContinue |
858 |
880 |
|
881 if clientType not in self.getSupportedLanguages(): |
|
882 # a not supported client language was requested |
|
883 E5MessageBox.critical( |
|
884 None, |
|
885 self.tr("Start Debugger"), |
|
886 self.tr( |
|
887 """<p>The debugger type <b>{0}</b> is not supported""" |
|
888 """ or not configured.</p>""").format(clientType) |
|
889 ) |
|
890 return |
|
891 |
859 # Restart the client |
892 # Restart the client |
860 try: |
893 try: |
861 if clientType: |
894 if clientType: |
862 self.__setClientType(clientType) |
895 self.__setClientType(clientType) |
863 else: |
896 else: |
909 @keyparam clientType client type to be used |
942 @keyparam clientType client type to be used |
910 @type str |
943 @type str |
911 """ |
944 """ |
912 self.__autoClearShell = autoClearShell |
945 self.__autoClearShell = autoClearShell |
913 |
946 |
|
947 if clientType not in self.getSupportedLanguages(): |
|
948 E5MessageBox.critical( |
|
949 None, |
|
950 self.tr("Start Debugger"), |
|
951 self.tr( |
|
952 """<p>The debugger type <b>{0}</b> is not supported""" |
|
953 """ or not configured.</p>""").format(clientType) |
|
954 ) |
|
955 # a not supported client language was requested |
|
956 return |
|
957 |
914 # Restart the client |
958 # Restart the client |
915 try: |
959 try: |
916 if clientType: |
960 if clientType: |
917 self.__setClientType(clientType) |
961 self.__setClientType(clientType) |
918 else: |
962 else: |
959 @keyparam clientType client type to be used |
1003 @keyparam clientType client type to be used |
960 @type str |
1004 @type str |
961 """ |
1005 """ |
962 self.__autoClearShell = autoClearShell |
1006 self.__autoClearShell = autoClearShell |
963 |
1007 |
|
1008 if clientType not in self.getSupportedLanguages(): |
|
1009 # a not supported client language was requested |
|
1010 E5MessageBox.critical( |
|
1011 None, |
|
1012 self.tr("Start Debugger"), |
|
1013 self.tr( |
|
1014 """<p>The debugger type <b>{0}</b> is not supported""" |
|
1015 """ or not configured.</p>""").format(clientType) |
|
1016 ) |
|
1017 return |
|
1018 |
964 # Restart the client |
1019 # Restart the client |
965 try: |
1020 try: |
966 if clientType: |
1021 if clientType: |
967 self.__setClientType(clientType) |
1022 self.__setClientType(clientType) |
968 else: |
1023 else: |
1008 @type bool |
1063 @type bool |
1009 @keyparam clientType client type to be used |
1064 @keyparam clientType client type to be used |
1010 @type str |
1065 @type str |
1011 """ |
1066 """ |
1012 self.__autoClearShell = autoClearShell |
1067 self.__autoClearShell = autoClearShell |
|
1068 |
|
1069 if clientType not in self.getSupportedLanguages(): |
|
1070 # a not supported client language was requested |
|
1071 E5MessageBox.critical( |
|
1072 None, |
|
1073 self.tr("Start Debugger"), |
|
1074 self.tr( |
|
1075 """<p>The debugger type <b>{0}</b> is not supported""" |
|
1076 """ or not configured.</p>""").format(clientType) |
|
1077 ) |
|
1078 return |
1013 |
1079 |
1014 # Restart the client |
1080 # Restart the client |
1015 try: |
1081 try: |
1016 if clientType: |
1082 if clientType: |
1017 self.__setClientType(clientType) |
1083 self.__setClientType(clientType) |
1248 filename (string) |
1314 filename (string) |
1249 @param coverase flag indicating erasure of coverage data is requested |
1315 @param coverase flag indicating erasure of coverage data is requested |
1250 (boolean) |
1316 (boolean) |
1251 @keyparam clientType client type to be used (string) |
1317 @keyparam clientType client type to be used (string) |
1252 """ |
1318 """ |
|
1319 if clientType not in self.getSupportedLanguages(): |
|
1320 # a not supported client language was requested |
|
1321 E5MessageBox.critical( |
|
1322 None, |
|
1323 self.tr("Start Debugger"), |
|
1324 self.tr( |
|
1325 """<p>The debugger type <b>{0}</b> is not supported""" |
|
1326 """ or not configured.</p>""").format(clientType) |
|
1327 ) |
|
1328 return |
|
1329 |
1253 # Restart the client if there is already a program loaded. |
1330 # Restart the client if there is already a program loaded. |
1254 try: |
1331 try: |
1255 if clientType: |
1332 if clientType: |
1256 self.__setClientType(clientType) |
1333 self.__setClientType(clientType) |
1257 else: |
1334 else: |