Added ipdb() function to help debug SCons scripts
This commit is contained in:
parent
6589eb7f7c
commit
cf80213e6b
1 changed files with 12 additions and 0 deletions
|
|
@ -401,3 +401,15 @@ def removeDirectory(name):
|
|||
if os.path.exists(name):
|
||||
print 'Removing directory "%s"' % name
|
||||
shutil.rmtree(name)
|
||||
|
||||
def ipdb():
|
||||
"""
|
||||
Break execution and drop into an IPython debug shell at the point
|
||||
where this function is called.
|
||||
"""
|
||||
from IPython.core.debugger import Pdb
|
||||
from IPython.core import ipapi
|
||||
|
||||
ip = ipapi.get()
|
||||
def_colors = ip.colors
|
||||
Pdb(def_colors).set_trace(sys._getframe().f_back)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue