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