---
title: "Meaning & Key Takeaway of: pdb also includes a postmortem function…"
description: "\"“pdb also includes a postmortem function (pdb.pm()) that you can run after an exception occurs, to get information from the time of the error. See”\" — ..."
image: "https://sms4smile.com/quotes/i/af6/mark-lutz-25814_postmortem_pdb-also-includes-a-postmortem-function_3133897.jpg"
---

#  pdb also includes a postmortem function (pdb.pm()) that…

![“pdb also includes a postmortem function (pdb.pm()) that you can run after an exception occurs, to get information from the time of the error. See” quote by Mark Lutz](https://sms4smile.com/quotes/i/af6/mark-lutz-25814_postmortem_pdb-also-includes-a-postmortem-function_3133897.jpg)   [Download](https://sms4smile.com/quotes/i/af6/mark-lutz-25814_postmortem_pdb-also-includes-a-postmortem-function_3133897.jpg) [Open image](https://sms4smile.com/quotes/i/af6/mark-lutz-25814_postmortem_pdb-also-includes-a-postmortem-function_3133897.jpg)

> ““pdb also includes a postmortem function (pdb.pm()) that you can run after an exception occurs, to get information from the time of the error. See””

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

A post‑mortem function lets developers inspect the state at the moment an exception occurs, aiding debugging.

**In simple terms:** Use post‑mortem to debug errors.

Key Takeaway

Run pdb.pm() after crashes.

Themes

debugging error handling software development Python

Mood

analytical technical

Type

educational practical

When to use this quote

- Production crash analysis
- unit test failures
- runtime debugging

Key Concepts

Post‑mortem analysis exception tracing state inspection

Questions to Reflect On

- When should you use post‑mortem vs. proactive logging?
- How does state inspection improve fix speed?

A Different Perspective

Relying on post‑mortem may not prevent the error from happening.

★ ★ ★ ★ ★   No ratings yet

## Related quotes

> [If you've been seeing someone for a short while and the "relationship" winds itself down mutually but not explicitly, no postmortem is necessary. But…](https://sms4smile.com/quotes/amber-heard/if-you-ve-been-seeing-someone-for-a-short-while-and-the-relationship/)

[Amber Heard](https://sms4smile.com/quotes/author/amber-heard/)

> [“It is not about "life after death" as such. Rather, it's a way of talking about being bodily alive again after a period of…](https://sms4smile.com/quotes/n-t-wright/it-is-not-about-life-after-death-as-such-rather-it-s-a-way-of-talking/)

[N.T. Wright](https://sms4smile.com/quotes/author/n-t-wright/)

> [“The words tasted sour. I agreed with Patrick. In New Orleans, sometimes death did feel more like socializing. And he knew better than anyone…](https://sms4smile.com/quotes/ruta-sepetys/the-words-tasted-sour-i-agreed-with-patrick-in-new-orleans-sometimes/)

[Ruta Sepetys](https://sms4smile.com/quotes/author/ruta-sepetys/)

> [“...The CDC has also said that it’s virtually impossible to tell a murder victim killed by a shot to the head or spinal column…](https://sms4smile.com/quotes/mira-grant/the-cdc-has-also-said-that-it-s-virtually-impossible-to-tell-a-murder/)

[Mira Grant](https://sms4smile.com/quotes/author/mira-grant/)

> [“psychologist Gary Klein, inspired by this research, devised a method for testing decisions that he calls the “premortem.” A postmortem analysis begins after a…](https://sms4smile.com/quotes/chip-heath/psychologist-gary-klein-inspired-by-this-research-devised-a-method/)

[Chip Heath](https://sms4smile.com/quotes/author/chip-heath/)

> [“Teach Others Who Weren’t There Even if everyone involved in a production understands what it taught them, the postmortem is a great way of…](https://sms4smile.com/quotes/ed-catmull/teach-others-who-weren-t-there-even-if-everyone-involved-in-a/)

[Ed Catmull](https://sms4smile.com/quotes/author/ed-catmull/)

## More by Mark Lutz

> [“and indent all but the simplest of blocks.”](https://sms4smile.com/quotes/mark-lutz/and-indent-all-but-the-simplest-of-blocks/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“when in Pythonland, do as Pythonistas do, not as C programmers do.”](https://sms4smile.com/quotes/mark-lutz/when-in-pythonland-do-as-pythonistas-do-not-as-c-programmers-do/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“you can do everything in Python that you can in Perl, but”](https://sms4smile.com/quotes/mark-lutz/you-can-do-everything-in-python-that-you-can-in-perl-but/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“Interestingly, the iteration protocol is even more pervasive in Python today than the examples so far have demonstrated — essentially everything in Python’s built-in…](https://sms4smile.com/quotes/mark-lutz/interestingly-the-iteration-protocol-is-even-more-pervasive-in-python/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“Boolean and and or operators return a true or false object in Python, not the values True or False.”](https://sms4smile.com/quotes/mark-lutz/boolean-and-and-or-operators-return-a-true-or-false-object-in-python/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“\_\_next\_\_ raises a built-in StopIteration exception at end-of-file”](https://sms4smile.com/quotes/mark-lutz/next-raises-a-built-in-stopiteration-exception-at-end-of-file/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“Besides directory paths on Windows, raw strings are also commonly used for regular expressions”](https://sms4smile.com/quotes/mark-lutz/besides-directory-paths-on-windows-raw-strings-are-also-commonly-used/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“absolutes in performance benchmarks are as elusive as consensus in open source projects!”](https://sms4smile.com/quotes/mark-lutz/absolutes-in-performance-benchmarks-are-as-elusive-as-consensus-in/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“The name used as the assignment target in a for header line is usually a (possibly new) variable in the scope where the for…](https://sms4smile.com/quotes/mark-lutz/the-name-used-as-the-assignment-target-in-a-for-header-line-is/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“give people a tool, and they’ll code for a day; teach them how to build tools, and they’ll code for a lifetime. This”](https://sms4smile.com/quotes/mark-lutz/give-people-a-tool-and-they-ll-code-for-a-day-teach-them-how-to-build/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [ “This description requires elaboration when the value and the slice being assigned overlap: L\[2:5\]=L\[3:6\], for instance, works fine because the value to be inserted… ](https://sms4smile.com/quotes/mark-lutz/this-description-requires-elaboration-when-the-value-and-the-slice/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“We met the list comprehension briefly in Chapter 4. Syntactically, its syntax is derived from a construct in set theory notation that applies an operation…](https://sms4smile.com/quotes/mark-lutz/we-met-the-list-comprehension-briefly-in-chapter-4-syntactically-its/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“In Pythons 3.3 and 2.7, you can get help for a module you have not imported by quoting the module’s name as a string…](https://sms4smile.com/quotes/mark-lutz/in-pythons-3-3-and-2-7-you-can-get-help-for-a-module-you-have-not/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“a raw string cannot end in an odd number of backslashes.”](https://sms4smile.com/quotes/mark-lutz/a-raw-string-cannot-end-in-an-odd-number-of-backslashes/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“In Python, practicality often beats aesthetics.”](https://sms4smile.com/quotes/mark-lutz/in-python-practicality-often-beats-aesthetics/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

[Explore all 22 Mark Lutz quotes ](https://sms4smile.com/quotes/author/mark-lutz/)

## More Postmortem quotes

> [If you've been seeing someone for a short while and the "relationship" winds itself down mutually but not explicitly, no postmortem is necessary. But…](https://sms4smile.com/quotes/amber-heard/if-you-ve-been-seeing-someone-for-a-short-while-and-the-relationship/)

[Amber Heard](https://sms4smile.com/quotes/author/amber-heard/)

> [“It is not about "life after death" as such. Rather, it's a way of talking about being bodily alive again after a period of…](https://sms4smile.com/quotes/n-t-wright/it-is-not-about-life-after-death-as-such-rather-it-s-a-way-of-talking/)

[N.T. Wright](https://sms4smile.com/quotes/author/n-t-wright/)

> [“The words tasted sour. I agreed with Patrick. In New Orleans, sometimes death did feel more like socializing. And he knew better than anyone…](https://sms4smile.com/quotes/ruta-sepetys/the-words-tasted-sour-i-agreed-with-patrick-in-new-orleans-sometimes/)

[Ruta Sepetys](https://sms4smile.com/quotes/author/ruta-sepetys/)

> [“...The CDC has also said that it’s virtually impossible to tell a murder victim killed by a shot to the head or spinal column…](https://sms4smile.com/quotes/mira-grant/the-cdc-has-also-said-that-it-s-virtually-impossible-to-tell-a-murder/)

[Mira Grant](https://sms4smile.com/quotes/author/mira-grant/)

> [“psychologist Gary Klein, inspired by this research, devised a method for testing decisions that he calls the “premortem.” A postmortem analysis begins after a…](https://sms4smile.com/quotes/chip-heath/psychologist-gary-klein-inspired-by-this-research-devised-a-method/)

[Chip Heath](https://sms4smile.com/quotes/author/chip-heath/)

> [“Teach Others Who Weren’t There Even if everyone involved in a production understands what it taught them, the postmortem is a great way of…](https://sms4smile.com/quotes/ed-catmull/teach-others-who-weren-t-there-even-if-everyone-involved-in-a/)

[Ed Catmull](https://sms4smile.com/quotes/author/ed-catmull/)

Browse all 7 Postmortem quotes

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "“pdb also includes a postmortem function (pdb.pm()) that you can run after an exception occurs, to get information from the time of the error. See”",
            "creator": {
                "@type": "Person",
                "name": "Mark Lutz"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/mark-lutz/pdb-also-includes-a-postmortem-function-pdb-pm-that-you-can-run-after/",
            "about": {
                "@type": "Thing",
                "name": "Postmortem"
            },
            "@id": "https://sms4smile.com/quotes/mark-lutz/pdb-also-includes-a-postmortem-function-pdb-pm-that-you-can-run-after/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/af6/mark-lutz-25814_postmortem_pdb-also-includes-a-postmortem-function_3133897.jpg",
                "contentUrl": "https://sms4smile.com/quotes/i/af6/mark-lutz-25814_postmortem_pdb-also-includes-a-postmortem-function_3133897.jpg",
                "url": "https://sms4smile.com/quotes/i/af6/mark-lutz-25814_postmortem_pdb-also-includes-a-postmortem-function_3133897.jpg",
                "width": 1080,
                "height": 1080,
                "caption": "“pdb also includes a postmortem function (pdb.pm()) that you can run after an exception occurs, to get…” — Mark Lutz",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Mark Lutz",
                    "item": "https://sms4smile.com/quotes/author/mark-lutz/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "“pdb also includes a postmortem function...",
                    "item": "https://sms4smile.com/quotes/mark-lutz/pdb-also-includes-a-postmortem-function-pdb-pm-that-you-can-run-after/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/mark-lutz/pdb-also-includes-a-postmortem-function-pdb-pm-that-you-can-run-after/#breadcrumb"
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
