390 elif method == "RequestVariable": |
390 elif method == "RequestVariable": |
391 self.__dumpVariable( |
391 self.__dumpVariable( |
392 params["variable"], params["frameNumber"], |
392 params["variable"], params["frameNumber"], |
393 params["scope"], params["filters"]) |
393 params["scope"], params["filters"]) |
394 |
394 |
|
395 elif method == "RequestStack": |
|
396 stack = self.mainThread.getStack() |
|
397 self.sendResponseLine(stack) |
|
398 |
395 elif method == "RequestThreadList": |
399 elif method == "RequestThreadList": |
396 self.dumpThreadList() |
400 self.dumpThreadList() |
397 |
401 |
398 elif method == "RequestThreadSet": |
402 elif method == "RequestThreadSet": |
399 if params["threadID"] in self.threads: |
403 if params["threadID"] == -1: |
400 self.setCurrentThread(params["threadID"]) |
404 # -1 is indication for the main thread |
|
405 threadId = -1 |
|
406 for thread in self.threads.values(): |
|
407 if thread.name == "MainThread": |
|
408 threadId = thread.id |
|
409 else: |
|
410 threadId = params["threadID"] |
|
411 if threadId in self.threads: |
|
412 self.setCurrentThread(threadId) |
401 self.sendJsonCommand("ResponseThreadSet", {}) |
413 self.sendJsonCommand("ResponseThreadSet", {}) |
402 stack = self.currentThread.getStack() |
414 stack = self.currentThread.getStack() |
403 self.sendJsonCommand("ResponseStack", { |
415 self.sendJsonCommand("ResponseStack", { |
404 "stack": stack, |
416 "stack": stack, |
405 }) |
417 }) |