(py_db, frame, event, info)
| 534 | |
| 535 | |
| 536 | def get_breakpoint(py_db, frame, event, info): |
| 537 | breakpoint_type = "django" |
| 538 | |
| 539 | if event == "call" and info.pydev_state != STATE_SUSPEND and py_db.django_breakpoints and _is_django_render_call(frame): |
| 540 | original_filename = _get_template_original_file_name_from_frame(frame) |
| 541 | pydev_log.debug("Django is rendering a template: %s", original_filename) |
| 542 | |
| 543 | canonical_normalized_filename = canonical_normalized_path(original_filename) |
| 544 | django_breakpoints_for_file = py_db.django_breakpoints.get(canonical_normalized_filename) |
| 545 | |
| 546 | if django_breakpoints_for_file: |
| 547 | # At this point, let's validate whether template lines are correct. |
| 548 | if IS_DJANGO19_OR_HIGHER: |
| 549 | django_validation_info = py_db.django_validation_info |
| 550 | context = frame.f_locals["context"] |
| 551 | django_template = context.template |
| 552 | django_validation_info.verify_breakpoints( |
| 553 | py_db, canonical_normalized_filename, django_breakpoints_for_file, django_template |
| 554 | ) |
| 555 | |
| 556 | pydev_log.debug("Breakpoints for that file: %s", django_breakpoints_for_file) |
| 557 | template_line = _get_template_line(frame) |
| 558 | pydev_log.debug("Tracing template line: %s", template_line) |
| 559 | |
| 560 | if template_line in django_breakpoints_for_file: |
| 561 | django_breakpoint = django_breakpoints_for_file[template_line] |
| 562 | new_frame = DjangoTemplateFrame(frame) |
| 563 | return django_breakpoint, new_frame, breakpoint_type |
| 564 | |
| 565 | return None |
| 566 | |
| 567 | |
| 568 | def suspend(py_db, thread, frame, bp_type): |
nothing calls this directly
no test coverage detected