.. _forgotten-debug-statement:

forgotten-debug-statement / W1515
=================================

**Message emitted:**

``Leaving functions creating breakpoints in production code is not recommended``

**Description:**

*Calls to breakpoint(), sys.breakpointhook() and pdb.set_trace() should be removed from code that is not actively being debugged.*

**Problematic code:**

.. literalinclude:: /data/messages/f/forgotten-debug-statement/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/f/forgotten-debug-statement/good.py
   :language: python





Created by the `stdlib <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/stdlib.py>`__ checker.