1
0
forked from VimPlug/jedi

Better debugging with the increase_indent_cm

This commit is contained in:
Dave Halter
2019-05-28 18:50:46 +02:00
parent 742f385f23
commit 255d4fc04f
2 changed files with 7 additions and 2 deletions

View File

@@ -84,13 +84,17 @@ def increase_indent(func):
@contextmanager
def increase_indent_cm():
def increase_indent_cm(title=None):
global _debug_indent
if title:
dbg('Start: ' + title, color='MAGENTA')
_debug_indent += 1
try:
yield
finally:
_debug_indent -= 1
if title:
dbg('End: ' + title, color='MAGENTA')
def dbg(message, *args, **kwargs):