django-planet
Nov. 26, 2024

Django: fix a view using a debugger with breakpoint()

published by Adam Johnson
in blog Adam Johnson
original entry Django: fix a view using a debugger with breakpoint()

This post is an adapted extract from my book Boost Your Django DX, available now with a 50% discount for Black Friday 2024.

Python’s breakpoint() function opens its debugger, pdb, which pauses the program and allows you to inspect and modify things. Let’s look at an example of …