debugger skips two internal frames now
--HG--
branch : trunk
diff --git a/jinja2/debug.py b/jinja2/debug.py
index 02b6177..ecd84ae 100644
--- a/jinja2/debug.py
+++ b/jinja2/debug.py
@@ -17,7 +17,7 @@
all the way down to the correct line numbers and frames.
"""
result_tb = prev_tb = None
- initial_tb = tb = exc_info[2]
+ initial_tb = tb = exc_info[2].tb_next
while tb is not None:
template = tb.tb_frame.f_globals.get('__jinja_template__')
@@ -65,7 +65,9 @@
tb_set_next(tb_back, exc_info[2])
if tb is not None:
tb_set_next(exc_info[2].tb_next, tb.tb_next)
- return exc_info
+
+ # return without this frame
+ return exc_info[:2] + (exc_info[2].tb_next,)
def _init_ugly_crap():