eric6/DebugClients/Python/DebugClientBase.py

branch
multi_processing
changeset 7422
9a008ab4811b
parent 7421
4a9900aef04e
child 7424
9bb7d8b0f966
equal deleted inserted replaced
7421:4a9900aef04e 7422:9a008ab4811b
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 37
37 if sys.version_info[0] == 2: 38 if sys.version_info[0] == 2:
38 from inspect import getargvalues, formatargvalues 39 from inspect import getargvalues, formatargvalues
39 else: 40 else:
40 unichr = chr 41 unichr = chr
2283 wd, host, port, exceptions, tracePython, redirect, 2284 wd, host, port, exceptions, tracePython, redirect,
2284 self.noencoding, self.fork_auto, self.fork_child, 2285 self.noencoding, self.fork_auto, self.fork_child,
2285 ) 2286 )
2286 if not self.noencoding: 2287 if not self.noencoding:
2287 self.__coding = self.defaultCoding 2288 self.__coding = self.defaultCoding
2289 patchNewProcessFunctions(multiprocess, self)
2288 res = self.startProgInDebugger( 2290 res = self.startProgInDebugger(
2289 args, wd, host, port, exceptions=exceptions, 2291 args, wd, host, port, exceptions=exceptions,
2290 tracePython=tracePython, redirect=redirect, 2292 tracePython=tracePython, redirect=redirect,
2291 passive=passive, multiprocessSupport=multiprocess 2293 passive=passive, multiprocessSupport=multiprocess
2292 ) 2294 )
2294 else: 2296 else:
2295 if sys.argv[1] == '--no-encoding': 2297 if sys.argv[1] == '--no-encoding':
2296 self.noencoding = True 2298 self.noencoding = True
2297 del sys.argv[1] 2299 del sys.argv[1]
2298 2300
2301 if sys.argv[1] == '--multiprocess':
2302 self.multiprocessSupport = True
2303 del sys.argv[1]
2304
2299 if sys.argv[1] == '': 2305 if sys.argv[1] == '':
2300 del sys.argv[1] 2306 del sys.argv[1]
2301 2307
2302 try: 2308 try:
2303 port = int(sys.argv[1]) 2309 port = int(sys.argv[1])
2336 self.noencoding, self.fork_auto, self.fork_child, 2342 self.noencoding, self.fork_auto, self.fork_child,
2337 ) 2343 )
2338 if not self.noencoding: 2344 if not self.noencoding:
2339 self.__coding = self.defaultCoding 2345 self.__coding = self.defaultCoding
2340 self.connectDebugger(port, remoteAddress, redirect) 2346 self.connectDebugger(port, remoteAddress, redirect)
2347 patchNewProcessFunctions(self.multiprocessSupport, self)
2341 self.__interact() 2348 self.__interact()
2342 else: 2349 else:
2343 print("No network port given. Aborting...") 2350 print("No network port given. Aborting...")
2344 # __IGNORE_WARNING_M801__ 2351 # __IGNORE_WARNING_M801__
2345 2352

eric ide

mercurial