Debugging your Lager Python program =================================== When using ``lager python``, a `remote pdb `_ tunnel is automatically established. To use it, add a call to `breakpoint() `_ in your code, and then use telnet to connect to port ``5555`` on host ``127.0.0.1``. Simple pdb example --------------------- .. code-block:: python :emphasize-lines: 9 :caption: breakpoint.py :name: Simple breakpoint example def foo(): print("hello") def bar(): print("world") def main(): print("started...") breakpoint() foo() bar() if __name__ == '__main__': main() Save the above listing as ``breakpoint.py`` .. code-block:: console ➜ lager python breakpoint.py started... RemotePdb session open at 0.0.0.0:5555, waiting for connection ... RemotePdb session open at 0.0.0.0:5555, waiting for connection ... Then in a separate terminal window: .. code-block:: console ➜ telnet 127.0.0.1 5555 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. > /tmp/tmpw5kcntdp.py(10)main() -> foo()