python / python/cpython

Add advanced debugging examples to pdb documentation

Offen
#119,579 4 Kommentare 2 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@gaogaotiantian arbeitet bereits daran.

Seit 26.5.2024.

docs
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
36k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Documentation

With gh-90095 being closed out by #116660, I believe a section on Advanced Usage of the pdb module would be beneficial. While the current documentation for pdb does discuss the use of .pdbrc file, it does not provide many examples of what is capable, these capabilities are mostly inferred. In fact a googling of ".pdbrc python" provides a few SO posts 1 2 asking how to set commands in .pdbrc with no real explanation. Additionally I only find 2 real webpages 3 4 that discuss at length the use of .pdbrc and it is mostly for defining aliases.

This Advanced Usage section would demonstrate how to set breakpoints and issue commands to those breakpoints from within the .pdbrc file as an alternative to placing inline breakpoint() and print() calls for debugging purposes.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.