How to use the pudb.settings.load_breakpoints function in pudb

To help you get started, we’ve selected a few pudb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github inducer / pudb / test / test_settings.py View on Github external
def test_load_breakpoints(mocker):
    fake_data = ['b /home/user/test.py:41'], ['b /home/user/test.py:50']
    mock_open = mocker.mock_open()
    mock_open.return_value.readlines.side_effect = fake_data
    mocker.patch.object(builtins, 'open', mock_open)
    mocker.patch('pudb.settings.lookup_module',
            mocker.Mock(return_value='/home/user/test.py'))
    mocker.patch('pudb.settings.get_breakpoint_invalid_reason',
            mocker.Mock(return_value=None))
    result = load_breakpoints()
    expected = [('/home/user/test.py', 41, False, None, None),
                ('/home/user/test.py', 50, False, None, None)]
    assert result == expected
github inducer / pudb / pudb / debugger.py View on Github external
def reload_breakpoints(w, size, key):
            self.debugger.clear_all_breaks()
            from pudb.settings import load_breakpoints
            for bpoint_descr in load_breakpoints():
                dbg.set_break(*bpoint_descr)
            self.update_breakpoints()
github SkyLeach / pudb.vim / rplugin / python3 / vim_pudb.py View on Github external
def iter_breakpoints(self, buffname=None):
        """iter_breakpoints
        iterates over the breakpoints registered with pudb for this buffer
        """
        for brpt in pudb.settings.load_breakpoints():
            if not buffname:
                yield self.pudbbp(*brpt[:2])
            elif buffname == brpt[0]:
                yield self.pudbbp(*brpt[:2])