158 args[0] = Utilities.getExecutablePath(args[0]) |
158 args[0] = Utilities.getExecutablePath(args[0]) |
159 process = self.__startProcess(args[0], args[1:]) |
159 process = self.__startProcess(args[0], args[1:]) |
160 if process is None: |
160 if process is None: |
161 E5MessageBox.critical(None, |
161 E5MessageBox.critical(None, |
162 self.trUtf8("Start Debugger"), |
162 self.trUtf8("Start Debugger"), |
163 self.trUtf8(\ |
163 self.trUtf8( |
164 """<p>The debugger backend could not be started.</p>""")) |
164 """<p>The debugger backend could not be started.</p>""")) |
165 |
165 |
166 # set translation function |
166 # set translation function |
167 if Preferences.getDebugger("PathTranslation"): |
167 if Preferences.getDebugger("PathTranslation"): |
168 self.translateRemote = \ |
168 self.translateRemote = \ |
180 # setup the environment for the debugger |
180 # setup the environment for the debugger |
181 if Preferences.getDebugger("DebugEnvironmentReplace"): |
181 if Preferences.getDebugger("DebugEnvironmentReplace"): |
182 clientEnv = {} |
182 clientEnv = {} |
183 else: |
183 else: |
184 clientEnv = os.environ.copy() |
184 clientEnv = os.environ.copy() |
185 envlist = Utilities.parseEnvironmentString(\ |
185 envlist = Utilities.parseEnvironmentString( |
186 Preferences.getDebugger("DebugEnvironment")) |
186 Preferences.getDebugger("DebugEnvironment")) |
187 for el in envlist: |
187 for el in envlist: |
188 try: |
188 try: |
189 key, value = el.split('=', 1) |
189 key, value = el.split('=', 1) |
190 if value.startswith('"') or value.startswith("'"): |
190 if value.startswith('"') or value.startswith("'"): |
203 args[0] = Utilities.getExecutablePath(args[0]) |
203 args[0] = Utilities.getExecutablePath(args[0]) |
204 process = self.__startProcess(args[0], args[1:], clientEnv) |
204 process = self.__startProcess(args[0], args[1:], clientEnv) |
205 if process is None: |
205 if process is None: |
206 E5MessageBox.critical(None, |
206 E5MessageBox.critical(None, |
207 self.trUtf8("Start Debugger"), |
207 self.trUtf8("Start Debugger"), |
208 self.trUtf8(\ |
208 self.trUtf8( |
209 """<p>The debugger backend could not be started.</p>""")) |
209 """<p>The debugger backend could not be started.</p>""")) |
210 return process, self.__isNetworked |
210 return process, self.__isNetworked |
211 |
211 |
212 process = self.__startProcess(interpreter, |
212 process = self.__startProcess(interpreter, |
213 [debugClient, str(port), redirect, ipaddr], |
213 [debugClient, str(port), redirect, ipaddr], |
251 args[0] = Utilities.getExecutablePath(args[0]) |
251 args[0] = Utilities.getExecutablePath(args[0]) |
252 process = self.__startProcess(args[0], args[1:]) |
252 process = self.__startProcess(args[0], args[1:]) |
253 if process is None: |
253 if process is None: |
254 E5MessageBox.critical(None, |
254 E5MessageBox.critical(None, |
255 self.trUtf8("Start Debugger"), |
255 self.trUtf8("Start Debugger"), |
256 self.trUtf8(\ |
256 self.trUtf8( |
257 """<p>The debugger backend could not be started.</p>""")) |
257 """<p>The debugger backend could not be started.</p>""")) |
258 # set translation function |
258 # set translation function |
259 if project.getDebugProperty("PATHTRANSLATION"): |
259 if project.getDebugProperty("PATHTRANSLATION"): |
260 self.translateRemote = project.getDebugProperty("REMOTEPATH") |
260 self.translateRemote = project.getDebugProperty("REMOTEPATH") |
261 self.translateLocal = project.getDebugProperty("LOCALPATH") |
261 self.translateLocal = project.getDebugProperty("LOCALPATH") |
270 # setup the environment for the debugger |
270 # setup the environment for the debugger |
271 if project.getDebugProperty("ENVIRONMENTOVERRIDE"): |
271 if project.getDebugProperty("ENVIRONMENTOVERRIDE"): |
272 clientEnv = {} |
272 clientEnv = {} |
273 else: |
273 else: |
274 clientEnv = os.environ.copy() |
274 clientEnv = os.environ.copy() |
275 envlist = Utilities.parseEnvironmentString(\ |
275 envlist = Utilities.parseEnvironmentString( |
276 project.getDebugProperty("ENVIRONMENTSTRING")) |
276 project.getDebugProperty("ENVIRONMENTSTRING")) |
277 for el in envlist: |
277 for el in envlist: |
278 try: |
278 try: |
279 key, value = el.split('=', 1) |
279 key, value = el.split('=', 1) |
280 if value.startswith('"') or value.startswith("'"): |
280 if value.startswith('"') or value.startswith("'"): |
294 args[0] = Utilities.getExecutablePath(args[0]) |
294 args[0] = Utilities.getExecutablePath(args[0]) |
295 process = self.__startProcess(args[0], args[1:], clientEnv) |
295 process = self.__startProcess(args[0], args[1:], clientEnv) |
296 if process is None: |
296 if process is None: |
297 E5MessageBox.critical(None, |
297 E5MessageBox.critical(None, |
298 self.trUtf8("Start Debugger"), |
298 self.trUtf8("Start Debugger"), |
299 self.trUtf8(\ |
299 self.trUtf8( |
300 """<p>The debugger backend could not be started.</p>""")) |
300 """<p>The debugger backend could not be started.</p>""")) |
301 return process, self.__isNetworked |
301 return process, self.__isNetworked |
302 |
302 |
303 process = self.__startProcess(interpreter, |
303 process = self.__startProcess(interpreter, |
304 [debugClient, str(port), redirect, ipaddr], |
304 [debugClient, str(port), redirect, ipaddr], |