PyDev.Debugger icon indicating copy to clipboard operation
PyDev.Debugger copied to clipboard

Debugger doesn't return to Django template frame after step into

Open trofimander opened this issue 10 years ago • 4 comments

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.

trofimander avatar Sep 04 '14 00:09 trofimander

By the way, why do we do that? I don't get it from comment.

trofimander avatar Sep 04 '14 01:09 trofimander

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.

fabioz avatar Sep 30 '14 00:09 fabioz

Can you give me an example/instructions on how to reproduce this?

fabioz avatar Sep 30 '14 11:09 fabioz

@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.

Elizaveta239 avatar Oct 01 '14 10:10 Elizaveta239