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 ) |
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 |