PyDev.Debugger
PyDev.Debugger copied to clipboard
Debugger doesn't return to Django template frame after step into
The code that prevents returning to correct frame is pydevd_frame.py:281
if stop_frame is frame and event in ('return', 'exception') and step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER):
info.pydev_step_cmd = CMD_STEP_INTO
info.pydev_step_stop = None
As we change step cmd to CMD_STEP_INTO handling in line 446 (elif step_cmd == CMD_STEP_OVER:) isn't executed.
By the way, why do we do that? I don't get it from comment.
We do that because of the dont trace implementation: if the back frame is not being traced we wouldn't stop in a step return.
Can you give me an example/instructions on how to reproduce this?
@fabioz When we debug Django template and we call, for example, object's method. We can step into, go to its definition and debug this method. When we leave it, we don't go back to template, but we go into Django inner functions.