MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / cmd_step_into

Function cmd_step_into

pydevd_plugins/jinja2_debug.py:387–414  ·  view source on GitHub ↗
(pydb, frame, event, info, thread, stop_info, stop)

Source from the content-addressed store, hash-verified

385
386
387def cmd_step_into(pydb, frame, event, info, thread, stop_info, stop):
388 plugin_stop = False
389 if _is_jinja2_suspended(thread):
390 plugin_stop = stop_info["jinja2_stop"] = event in ("call", "line") and _is_jinja2_render_call(frame)
391 stop = False
392 if info.pydev_call_from_jinja2 is not None:
393 if _is_jinja2_internal_function(frame):
394 # if internal Jinja2 function was called, we should continue debugging inside template
395 info.pydev_call_from_jinja2 = None
396 else:
397 # we go into python code from Jinja2 rendering frame
398 stop = True
399
400 if event == "call" and _is_jinja2_context_call(frame.f_back):
401 # we called function from context, the next step will be in function
402 info.pydev_call_from_jinja2 = 1
403
404 if event == "return" and _is_jinja2_context_call(frame.f_back):
405 # we return from python code to Jinja2 rendering frame
406 info.pydev_step_stop = info.pydev_call_from_jinja2
407 info.pydev_call_from_jinja2 = None
408 thread.additional_info.suspend_type = JINJA2_SUSPEND
409 stop = False
410
411 # print "info.pydev_call_from_jinja2", info.pydev_call_from_jinja2, "stop_info", stop_info, \
412 # "thread.additional_info.suspend_type", thread.additional_info.suspend_type
413 # print "event", event, "farme.locals", frame.f_locals
414 return stop, plugin_stop
415
416
417def cmd_step_over(pydb, frame, event, info, thread, stop_info, stop):

Callers

nothing calls this directly

Calls 4

_is_jinja2_suspendedFunction · 0.85
_is_jinja2_render_callFunction · 0.85
_is_jinja2_context_callFunction · 0.85

Tested by

no test coverage detected