266 @param clientType type of the client interface to be created (string) |
266 @param clientType type of the client interface to be created (string) |
267 """ |
267 """ |
268 if self.lastClientType != self.clientType or clientType is not None: |
268 if self.lastClientType != self.clientType or clientType is not None: |
269 if clientType is None: |
269 if clientType is None: |
270 clientType = self.clientType |
270 clientType = self.clientType |
271 if clientType == "Python": |
271 if clientType == "Python2": |
272 from .DebuggerInterfacePython import DebuggerInterfacePython |
272 from .DebuggerInterfacePython import DebuggerInterfacePython |
273 self.debuggerInterface = DebuggerInterfacePython(self, self.passive) |
273 self.debuggerInterface = DebuggerInterfacePython(self, self.passive) |
274 elif clientType == "Python3": |
274 elif clientType == "Python3": |
275 from .DebuggerInterfacePython3 import DebuggerInterfacePython3 |
275 from .DebuggerInterfacePython3 import DebuggerInterfacePython3 |
276 self.debuggerInterface = DebuggerInterfacePython3(self, self.passive) |
276 self.debuggerInterface = DebuggerInterfacePython3(self, self.passive) |
652 |
652 |
653 # Restart the client |
653 # Restart the client |
654 try: |
654 try: |
655 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
655 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
656 except KeyError: |
656 except KeyError: |
657 self.__setClientType('Python') # assume it is a Python file |
657 self.__setClientType('Python3') # assume it is a Python3 file |
658 self.startClient(False, forProject = forProject, runInConsole = runInConsole) |
658 self.startClient(False, forProject = forProject, runInConsole = runInConsole) |
659 |
659 |
660 self.remoteEnvironment(env) |
660 self.remoteEnvironment(env) |
661 |
661 |
662 self.debuggerInterface.remoteLoad(fn, argv, wd, tracePython, autoContinue, |
662 self.debuggerInterface.remoteLoad(fn, argv, wd, tracePython, autoContinue, |
687 |
687 |
688 # Restart the client |
688 # Restart the client |
689 try: |
689 try: |
690 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
690 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
691 except KeyError: |
691 except KeyError: |
692 self.__setClientType('Python') # assume it is a Python file |
692 self.__setClientType('Python3') # assume it is a Python3 file |
693 self.startClient(False, forProject = forProject, runInConsole = runInConsole) |
693 self.startClient(False, forProject = forProject, runInConsole = runInConsole) |
694 |
694 |
695 self.remoteEnvironment(env) |
695 self.remoteEnvironment(env) |
696 |
696 |
697 self.debuggerInterface.remoteRun(fn, argv, wd, autoFork, forkChild) |
697 self.debuggerInterface.remoteRun(fn, argv, wd, autoFork, forkChild) |
718 |
718 |
719 # Restart the client |
719 # Restart the client |
720 try: |
720 try: |
721 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
721 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
722 except KeyError: |
722 except KeyError: |
723 self.__setClientType('Python') # assume it is a Python file |
723 self.__setClientType('Python3') # assume it is a Python3 file |
724 self.startClient(False, forProject = forProject, runInConsole = runInConsole) |
724 self.startClient(False, forProject = forProject, runInConsole = runInConsole) |
725 |
725 |
726 self.remoteEnvironment(env) |
726 self.remoteEnvironment(env) |
727 |
727 |
728 self.debuggerInterface.remoteCoverage(fn, argv, wd, erase) |
728 self.debuggerInterface.remoteCoverage(fn, argv, wd, erase) |
749 |
749 |
750 # Restart the client |
750 # Restart the client |
751 try: |
751 try: |
752 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
752 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
753 except KeyError: |
753 except KeyError: |
754 self.__setClientType('Python') # assume it is a Python file |
754 self.__setClientType('Python3') # assume it is a Python3 file |
755 self.startClient(False, forProject = forProject, runInConsole = runInConsole) |
755 self.startClient(False, forProject = forProject, runInConsole = runInConsole) |
756 |
756 |
757 self.remoteEnvironment(env) |
757 self.remoteEnvironment(env) |
758 |
758 |
759 self.debuggerInterface.remoteProfile(fn, argv, wd, erase) |
759 self.debuggerInterface.remoteProfile(fn, argv, wd, erase) |
967 """ |
967 """ |
968 # Restart the client if there is already a program loaded. |
968 # Restart the client if there is already a program loaded. |
969 try: |
969 try: |
970 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
970 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) |
971 except KeyError: |
971 except KeyError: |
972 self.__setClientType('Python') # assume it is a Python file |
972 self.__setClientType('Python3') # assume it is a Python3 file |
973 self.startClient(False) |
973 self.startClient(False) |
974 |
974 |
975 self.debuggerInterface.remoteUTPrepare(fn, tn, tfn, cov, covname, coverase) |
975 self.debuggerInterface.remoteUTPrepare(fn, tn, tfn, cov, covname, coverase) |
976 self.debugging = False |
976 self.debugging = False |
977 |
977 |