220 self.pollingDisabled = False |
220 self.pollingDisabled = False |
221 |
221 |
222 self.callTraceEnabled = None |
222 self.callTraceEnabled = None |
223 |
223 |
224 self.variant = 'You should not see this' |
224 self.variant = 'You should not see this' |
225 |
|
226 # commandline completion stuff |
|
227 self.complete = Completer(self.debugMod.__dict__).complete |
|
228 |
225 |
229 self.compile_command = codeop.CommandCompiler() |
226 self.compile_command = codeop.CommandCompiler() |
230 |
227 |
231 self.coding_re = re.compile(r"coding[:=]\s*([-\w_.]+)") |
228 self.coding_re = re.compile(r"coding[:=]\s*([-\w_.]+)") |
232 self.defaultCoding = 'utf-8' |
229 self.defaultCoding = 'utf-8' |
1776 localdict = self.currentThread.getFrameLocals(self.framenr) |
1773 localdict = self.currentThread.getFrameLocals(self.framenr) |
1777 localCompleter = Completer(localdict).complete |
1774 localCompleter = Completer(localdict).complete |
1778 self.__getCompletionList(text, localCompleter, completions) |
1775 self.__getCompletionList(text, localCompleter, completions) |
1779 except AttributeError: |
1776 except AttributeError: |
1780 pass |
1777 pass |
1781 self.__getCompletionList(text, self.complete, completions) |
1778 |
|
1779 cf = self.currentThread.getCurrentFrame() |
|
1780 frmnr = self.framenr |
|
1781 while cf is not None and frmnr > 0: |
|
1782 cf = cf.f_back |
|
1783 frmnr -= 1 |
|
1784 |
|
1785 if cf is None: |
|
1786 globaldict = self.debugMod.__dict__ |
|
1787 else: |
|
1788 globaldict = cf.f_globals |
|
1789 |
|
1790 globalCompleter = Completer(globaldict).complete |
|
1791 self.__getCompletionList(text, globalCompleter, completions) |
1782 |
1792 |
1783 self.sendJsonCommand("ResponseCompletion", { |
1793 self.sendJsonCommand("ResponseCompletion", { |
1784 "completions": list(completions), |
1794 "completions": list(completions), |
1785 "text": text, |
1795 "text": text, |
1786 }) |
1796 }) |