eric6/DebugClients/Python/DebugClientBase.py

branch
multi_processing
changeset 7424
9bb7d8b0f966
parent 7422
9a008ab4811b
child 7428
27c55a3d0b89
equal deleted inserted replaced
7422:9a008ab4811b 7424:9bb7d8b0f966
31 from AsyncFile import AsyncFile, AsyncPendingWrite 31 from AsyncFile import AsyncFile, AsyncPendingWrite
32 from DebugConfig import ConfigQtNames, ConfigVarTypeStrings 32 from DebugConfig import ConfigQtNames, ConfigVarTypeStrings
33 from FlexCompleter import Completer 33 from FlexCompleter import Completer
34 from DebugUtilities import prepareJsonCommand 34 from DebugUtilities import prepareJsonCommand
35 from BreakpointWatch import Breakpoint, Watch 35 from BreakpointWatch import Breakpoint, Watch
36 from MultiProcessDebugExtension import patchNewProcessFunctions 36 ##from MultiProcessDebugExtension import patchNewProcessFunctions
37 37
38 if sys.version_info[0] == 2: 38 if sys.version_info[0] == 2:
39 from inspect import getargvalues, formatargvalues 39 from inspect import getargvalues, formatargvalues
40 else: 40 else:
41 unichr = chr 41 unichr = chr
103 except (AttributeError, KeyError): 103 except (AttributeError, KeyError):
104 DebugClientOrigInput = lambda x: '' # __IGNORE_WARNING__ 104 DebugClientOrigInput = lambda x: '' # __IGNORE_WARNING__
105 else: 105 else:
106 try: 106 try:
107 DebugClientOrigInput = __builtins__.__dict__['input'] 107 DebugClientOrigInput = __builtins__.__dict__['input']
108 __builtins__.__dict__['input'] = DebugClientRawInput 108 __builtins__.__dict__['input'] = DebugClientInput
109 except (AttributeError, KeyError): 109 except (AttributeError, KeyError):
110 try: 110 try:
111 import __main__ 111 import __main__
112 DebugClientOrigInput = __main__.__builtins__.__dict__['input'] 112 DebugClientOrigInput = __main__.__builtins__.__dict__['input']
113 __main__.__builtins__.__dict__['input'] = DebugClientRawInput 113 __main__.__builtins__.__dict__['input'] = DebugClientInput
114 except (AttributeError, KeyError): 114 except (AttributeError, KeyError):
115 DebugClientOrigInput = lambda x: '' # __IGNORE_WARNING__ 115 DebugClientOrigInput = lambda x: '' # __IGNORE_WARNING__
116 116
117 ############################################################################### 117 ###############################################################################
118 118
2284 wd, host, port, exceptions, tracePython, redirect, 2284 wd, host, port, exceptions, tracePython, redirect,
2285 self.noencoding, self.fork_auto, self.fork_child, 2285 self.noencoding, self.fork_auto, self.fork_child,
2286 ) 2286 )
2287 if not self.noencoding: 2287 if not self.noencoding:
2288 self.__coding = self.defaultCoding 2288 self.__coding = self.defaultCoding
2289 patchNewProcessFunctions(multiprocess, self) 2289 ## patchNewProcessFunctions(multiprocess, self)
2290 res = self.startProgInDebugger( 2290 res = self.startProgInDebugger(
2291 args, wd, host, port, exceptions=exceptions, 2291 args, wd, host, port, exceptions=exceptions,
2292 tracePython=tracePython, redirect=redirect, 2292 tracePython=tracePython, redirect=redirect,
2293 passive=passive, multiprocessSupport=multiprocess 2293 passive=passive, multiprocessSupport=multiprocess
2294 ) 2294 )
2342 self.noencoding, self.fork_auto, self.fork_child, 2342 self.noencoding, self.fork_auto, self.fork_child,
2343 ) 2343 )
2344 if not self.noencoding: 2344 if not self.noencoding:
2345 self.__coding = self.defaultCoding 2345 self.__coding = self.defaultCoding
2346 self.connectDebugger(port, remoteAddress, redirect) 2346 self.connectDebugger(port, remoteAddress, redirect)
2347 patchNewProcessFunctions(self.multiprocessSupport, self) 2347 ## patchNewProcessFunctions(self.multiprocessSupport, self)
2348 self.__interact() 2348 self.__interact()
2349 else: 2349 else:
2350 print("No network port given. Aborting...") 2350 print("No network port given. Aborting...")
2351 # __IGNORE_WARNING_M801__ 2351 # __IGNORE_WARNING_M801__
2352 2352

eric ide

mercurial