222 |
222 |
223 self.readstream = None |
223 self.readstream = None |
224 self.writestream = None |
224 self.writestream = None |
225 self.errorstream = None |
225 self.errorstream = None |
226 self.pollingDisabled = False |
226 self.pollingDisabled = False |
|
227 |
|
228 self.callTraceEnabled = False |
|
229 self.__newCallTraceEnabled = False |
227 |
230 |
228 self.skipdirs = sys.path[:] |
231 self.skipdirs = sys.path[:] |
229 |
232 |
230 self.variant = 'You should not see this' |
233 self.variant = 'You should not see this' |
231 |
234 |
454 if cmd == DebugProtocol.RequestOK: |
457 if cmd == DebugProtocol.RequestOK: |
455 self.write(self.pendingResponse + '\n') |
458 self.write(self.pendingResponse + '\n') |
456 self.pendingResponse = DebugProtocol.ResponseOK |
459 self.pendingResponse = DebugProtocol.ResponseOK |
457 return |
460 return |
458 |
461 |
|
462 if cmd == DebugProtocol.RequestCallTrace: |
|
463 if arg.strip().lower() == "on": |
|
464 callTraceEnabled = True |
|
465 else: |
|
466 callTraceEnabled = False |
|
467 if self.debugging: |
|
468 self.callTraceEnabled = callTraceEnabled |
|
469 else: |
|
470 self.__newCallTraceEnabled = callTraceEnabled # remember for later |
|
471 return |
|
472 |
459 if cmd == DebugProtocol.RequestEnv: |
473 if cmd == DebugProtocol.RequestEnv: |
460 env = eval(arg) |
474 env = eval(arg) |
461 for key, value in env.items(): |
475 for key, value in env.items(): |
462 if key.endswith("+"): |
476 if key.endswith("+"): |
463 if key[:-1] in os.environ: |
477 if key[:-1] in os.environ: |
504 # need for this is on Windows os where backslash is the path separator. |
518 # need for this is on Windows os where backslash is the path separator. |
505 # They will get inadvertantly stripped away during the eval causing |
519 # They will get inadvertantly stripped away during the eval causing |
506 # IOErrors, if self.running is passed as a normal str. |
520 # IOErrors, if self.running is passed as a normal str. |
507 self.debugMod.__dict__['__file__'] = self.running |
521 self.debugMod.__dict__['__file__'] = self.running |
508 sys.modules['__main__'] = self.debugMod |
522 sys.modules['__main__'] = self.debugMod |
|
523 self.callTraceEnabled = self.__newCallTraceEnabled |
509 res = self.mainThread.run('execfile(' + repr(self.running) + ')', |
524 res = self.mainThread.run('execfile(' + repr(self.running) + ')', |
510 self.debugMod.__dict__) |
525 self.debugMod.__dict__) |
511 self.progTerminated(res) |
526 self.progTerminated(res) |
512 return |
527 return |
513 |
528 |