Show More
@@ -278,7 +278,8 class ZopeDebug(object): | |||
|
278 | 278 | zope_debug = None |
|
279 | 279 | |
|
280 | 280 | def ipy_set_trace(): |
|
281 | import IPython; IPython.Debugger.Pdb().set_trace() | |
|
281 | from IPython.core import debugger | |
|
282 | debugger.Pdb().set_trace() | |
|
282 | 283 | |
|
283 | 284 | def main(): |
|
284 | 285 | global zope_debug |
@@ -3,7 +3,7 import IPython.ipapi | |||
|
3 | 3 | from IPython.genutils import arg_split |
|
4 | 4 | ip = IPython.ipapi.get() |
|
5 | 5 | |
|
6 |
from IPython import |
|
|
6 | from IPython.core import debugger | |
|
7 | 7 | |
|
8 | 8 | def call_pydb(self, args): |
|
9 | 9 | """Invoke pydb with the supplied parameters.""" |
@@ -18,7 +18,7 def call_pydb(self, args): | |||
|
18 | 18 | argl = arg_split(args) |
|
19 | 19 | # print argl # dbg |
|
20 | 20 | if len(inspect.getargspec(pydb.runv)[0]) == 2: |
|
21 |
pdb = |
|
|
21 | pdb = debugger.Pdb(color_scheme=self.rc.colors) | |
|
22 | 22 | ip.IP.history_saving_wrapper( lambda : pydb.runv(argl, pdb) )() |
|
23 | 23 | else: |
|
24 | 24 | ip.IP.history_saving_wrapper( lambda : pydb.runv(argl) )() |
@@ -43,7 +43,8 except ImportError: | |||
|
43 | 43 | |
|
44 | 44 | # Homebrewed |
|
45 | 45 | import IPython |
|
46 |
from IPython import |
|
|
46 | from IPython import OInspect, wildcard | |
|
47 | from IPython.core import debugger | |
|
47 | 48 | from IPython.FakeModule import FakeModule |
|
48 | 49 | from IPython.Itpl import Itpl, itpl, printpl,itplns |
|
49 | 50 | from IPython.PyColorize import Parser |
@@ -1621,7 +1622,7 Currently the magic system has the following functions:\n""" | |||
|
1621 | 1622 | stats = self.magic_prun('',0,opts,arg_lst,prog_ns) |
|
1622 | 1623 | else: |
|
1623 | 1624 | if opts.has_key('d'): |
|
1624 |
deb = |
|
|
1625 | deb = debugger.Pdb(self.shell.rc.colors) | |
|
1625 | 1626 | # reset Breakpoint state, which is moronically kept |
|
1626 | 1627 | # in a class |
|
1627 | 1628 | bdb.Breakpoint.next = 1 |
@@ -94,7 +94,7 class Tracer(object): | |||
|
94 | 94 | |
|
95 | 95 | Usage example: |
|
96 | 96 | |
|
97 |
from IPython. |
|
|
97 | from IPython.core.debugger import Tracer; debug_here = Tracer() | |
|
98 | 98 | |
|
99 | 99 | ... later in your code |
|
100 | 100 | debug_here() # -> will open up the debugger at that point. |
@@ -6,3 +6,6 def test_import_completer(): | |||
|
6 | 6 | |
|
7 | 7 | def test_import_crashhandler(): |
|
8 | 8 | from IPython.core import crashhandler |
|
9 | ||
|
10 | def test_import_debugger(): | |
|
11 | from IPython.core import debugger No newline at end of file |
@@ -45,7 +45,8 import tempfile | |||
|
45 | 45 | |
|
46 | 46 | # IPython's own modules |
|
47 | 47 | #import IPython |
|
48 |
from IPython import |
|
|
48 | from IPython import OInspect,PyColorize,ultraTB | |
|
49 | from IPython.core import debugger | |
|
49 | 50 | from IPython.Extensions import pickleshare |
|
50 | 51 | from IPython.FakeModule import FakeModule, init_fakemod_dict |
|
51 | 52 | from IPython.Itpl import ItplNS |
@@ -1673,7 +1674,7 class InteractiveShell(object,Magic): | |||
|
1673 | 1674 | return |
|
1674 | 1675 | |
|
1675 | 1676 | # use pydb if available |
|
1676 |
if |
|
|
1677 | if debugger.has_pydb: | |
|
1677 | 1678 | from pydb import pm |
|
1678 | 1679 | else: |
|
1679 | 1680 | # fallback to our internal debugger |
@@ -90,7 +90,8 from inspect import getsourcefile, getfile, getmodule,\ | |||
|
90 | 90 | |
|
91 | 91 | # IPython's own modules |
|
92 | 92 | # Modified pdb which doesn't damage IPython's readline handling |
|
93 |
from IPython import |
|
|
93 | from IPython import PyColorize | |
|
94 | from IPython.core import debugger | |
|
94 | 95 | from IPython.ipstruct import Struct |
|
95 | 96 | from IPython.excolors import exception_colors |
|
96 | 97 | from IPython.genutils import Term,uniq_stable,error,info |
@@ -322,7 +323,7 class TBTools: | |||
|
322 | 323 | self.old_scheme = color_scheme # save initial value for toggles |
|
323 | 324 | |
|
324 | 325 | if call_pdb: |
|
325 |
self.pdb = |
|
|
326 | self.pdb = debugger.Pdb(self.color_scheme_table.active_scheme_name) | |
|
326 | 327 | else: |
|
327 | 328 | self.pdb = None |
|
328 | 329 | |
@@ -847,7 +848,7 class VerboseTB(TBTools): | |||
|
847 | 848 | |
|
848 | 849 | if force or self.call_pdb: |
|
849 | 850 | if self.pdb is None: |
|
850 |
self.pdb = |
|
|
851 | self.pdb = debugger.Pdb( | |
|
851 | 852 | self.color_scheme_table.active_scheme_name) |
|
852 | 853 | # the system displayhook may have changed, restore the original |
|
853 | 854 | # for pdb |
@@ -199,7 +199,7 def make_runners(): | |||
|
199 | 199 | # decorator. See ticket https://bugs.launchpad.net/bugs/366209 |
|
200 | 200 | top_mod = \ |
|
201 | 201 | ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', |
|
202 |
'crashhandler.py', ' |
|
|
202 | 'crashhandler.py', 'debugger.py', 'deep_reload.py', 'demo.py', | |
|
203 | 203 | 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', |
|
204 | 204 | 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', |
|
205 | 205 | 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', |
@@ -90,7 +90,8 from inspect import getsourcefile, getfile, getmodule,\ | |||
|
90 | 90 | |
|
91 | 91 | # IPython's own modules |
|
92 | 92 | # Modified pdb which doesn't damage IPython's readline handling |
|
93 |
from IPython import |
|
|
93 | from IPython import PyColorize | |
|
94 | from IPython.core import debugger | |
|
94 | 95 | from IPython.ipstruct import Struct |
|
95 | 96 | from IPython.excolors import exception_colors |
|
96 | 97 | from IPython.genutils import Term,uniq_stable,error,info |
@@ -320,7 +321,7 class TBTools: | |||
|
320 | 321 | self.old_scheme = color_scheme # save initial value for toggles |
|
321 | 322 | |
|
322 | 323 | if call_pdb: |
|
323 |
self.pdb = |
|
|
324 | self.pdb = debugger.Pdb(self.color_scheme_table.active_scheme_name) | |
|
324 | 325 | else: |
|
325 | 326 | self.pdb = None |
|
326 | 327 | |
@@ -837,7 +838,7 class VerboseTB(TBTools): | |||
|
837 | 838 | |
|
838 | 839 | if force or self.call_pdb: |
|
839 | 840 | if self.pdb is None: |
|
840 |
self.pdb = |
|
|
841 | self.pdb = debugger.Pdb( | |
|
841 | 842 | self.color_scheme_table.active_scheme_name) |
|
842 | 843 | # the system displayhook may have changed, restore the original |
|
843 | 844 | # for pdb |
General Comments 0
You need to be logged in to leave comments.
Login now