MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / add_breakpoint

Method add_breakpoint

_pydevd_bundle/pydevd_api.py:416–633  ·  view source on GitHub ↗

:param str original_filename: Note: must be sent as it was received in the protocol. It may be translated in this function and its final value will be available in the returned _AddBreakpointResult. :param str breakpoint_type: One of: 'python-lin

(
        self,
        py_db,
        original_filename,
        breakpoint_type,
        breakpoint_id,
        line,
        condition,
        func_name,
        expression,
        suspend_policy,
        hit_condition,
        is_logpoint,
        adjust_line=False,
        on_changed_breakpoint_state=None,
    )

Source from the content-addressed store, hash-verified

414 self.original_line = original_line
415
416 def add_breakpoint(
417 self,
418 py_db,
419 original_filename,
420 breakpoint_type,
421 breakpoint_id,
422 line,
423 condition,
424 func_name,
425 expression,
426 suspend_policy,
427 hit_condition,
428 is_logpoint,
429 adjust_line=False,
430 on_changed_breakpoint_state=None,
431 ):
432 """
433 :param str original_filename:
434 Note: must be sent as it was received in the protocol. It may be translated in this
435 function and its final value will be available in the returned _AddBreakpointResult.
436
437 :param str breakpoint_type:
438 One of: 'python-line', 'django-line', 'jinja2-line'.
439
440 :param int breakpoint_id:
441
442 :param int line:
443 Note: it's possible that a new line was actually used. If that's the case its
444 final value will be available in the returned _AddBreakpointResult.
445
446 :param condition:
447 Either None or the condition to activate the breakpoint.
448
449 :param str func_name:
450 If "None" (str), may hit in any context.
451 Empty string will hit only top level.
452 Any other value must match the scope of the method to be matched.
453
454 :param str expression:
455 None or the expression to be evaluated.
456
457 :param suspend_policy:
458 Either "NONE" (to suspend only the current thread when the breakpoint is hit) or
459 "ALL" (to suspend all threads when a breakpoint is hit).
460
461 :param str hit_condition:
462 An expression where `@HIT@` will be replaced by the number of hits.
463 i.e.: `@HIT@ == x` or `@HIT@ >= x`
464
465 :param bool is_logpoint:
466 If True and an expression is passed, pydevd will create an io message command with the
467 result of the evaluation.
468
469 :param bool adjust_line:
470 If True, the breakpoint line should be adjusted if the current line doesn't really
471 match an executable line (if possible).
472
473 :param callable on_changed_breakpoint_state:

Callers 5

reapply_breakpointsMethod · 0.95
cmd_set_breakMethod · 0.45

Calls 12

filename_to_serverMethod · 0.95
to_strMethod · 0.95
LineBreakpointClass · 0.90
_get_code_linesFunction · 0.85
map_to_serverMethod · 0.80
apply_files_filterMethod · 0.80
get_plugin_lazy_initMethod · 0.80
has_line_breaksMethod · 0.80

Tested by 1