--- a/eric6/DebugClients/Python/DebugClientBase.py Sat Feb 08 16:48:44 2020 +0100 +++ b/eric6/DebugClients/Python/DebugClientBase.py Mon Feb 10 18:41:37 2020 +0100 @@ -2053,16 +2053,14 @@ self.__interceptSignals() # This will eventually enter a local event loop. - # Note the use of backquotes to cause a repr of self.running. The - # need for this is on Windows os where backslash is the path separator. - # They will get inadvertantly stripped away during the eval causing - # IOErrors if self.running is passed as a normal str. self.debugMod.__dict__['__file__'] = self.running sys.modules['__main__'] = self.debugMod - res = self.mainThread.run( - 'exec(open(' + repr(self.running) + ').read())', - self.debugMod.__dict__) - self.progTerminated(res) + code = self.__compileFileSource(self.running) + if code: + res = self.mainThread.run(code, self.debugMod.__dict__, debug=True) + self.progTerminated(res) + else: + self.progTerminated(42) # should not happen def run_call(self, scriptname, func, *args): """