Debugger/DebuggerInterfacePython.py

changeset 6848
7682182a0f0f
parent 6822
f34e48fdfd92
child 6892
c147620313c5
--- a/Debugger/DebuggerInterfacePython.py	Sun Mar 10 15:05:44 2019 +0100
+++ b/Debugger/DebuggerInterfacePython.py	Sun Mar 10 18:17:54 2019 +0100
@@ -228,7 +228,15 @@
                 args = Utilities.parseOptionString(rexec) + \
                     [rhost, interpreter, debugClient,
                         noencoding, str(port), redirect, ipaddr]
-                args[0] = Utilities.getExecutablePath(args[0])
+                if Utilities.isWindowsPlatform():
+                    if not os.path.splitext(args[0])[1]:
+                        for ext in [".exe", ".com", ".cmd", ".bat"]:
+                            prog = Utilities.getExecutablePath(args[0] + ext)
+                            if prog:
+                                args[0] = prog
+                                break
+                else:
+                    args[0] = Utilities.getExecutablePath(args[0])
                 process = self.__startProcess(args[0], args[1:],
                                               workingDir=workingDir)
                 if process is None:
@@ -381,7 +389,15 @@
                 args = Utilities.parseOptionString(rexec) + \
                     [rhost, interpreter, debugClient, noencoding,
                      str(port), redirect, ipaddr]
-                args[0] = Utilities.getExecutablePath(args[0])
+                if Utilities.isWindowsPlatform():
+                    if not os.path.splitext(args[0])[1]:
+                        for ext in [".exe", ".com", ".cmd", ".bat"]:
+                            prog = Utilities.getExecutablePath(args[0] + ext)
+                            if prog:
+                                args[0] = prog
+                                break
+                else:
+                    args[0] = Utilities.getExecutablePath(args[0])
                 process = self.__startProcess(args[0], args[1:],
                                               workingDir=workingDir)
                 if process is None:

eric ide

mercurial