Python Traceback For Humans!

Anand Reddy Pandikunta (~anand_reddy)


8

Votes

Description:

When we have to debug our code, we think about print statement(or logging) or using debuggers like pdb.

But we rarely think about using traceback as a debugging tool.

In this talk we will dig the traceback gold mine and use it for quick & effective debugging.

Agenda:

~05 min - What is traceback?

~05 min - Replacing default traceback with colored traceback.

~05 min - Things You can do with custom traceback.

~15 min - Traceback: The forgotten debugging tool.

~05 min - Using Conditionals/Exceptions For Better Traceback.

~05 min - Q & A.

Prerequisites:

  • Able to write FizzBuzz test, dict comprehension without googling.

  • Can play with *args/**kwargs, locals/globals, builtins/dunder methods.

  • Must have read Python docs for atleast couple of functions/modules.

  • Must have checked source code for atleast one Python package.

Good to have:

  • Interested to write own packages(or already written).

  • Interested about Python internals.

Content URLs:

Note: These are drafts. Will update in few days.

Slides: https://chillaranand.github.io/py-trace/

Code: https://github.com/ChillarAnand/py-trace/tree/gh-pages/code

Speaker Info:

Projects: ptb, real-auto-save, fadapa.

Helped in developing PythonIndia/Junction.

Talks & Articles about Python!

Speaker Links:

Github

StackOverflow

Blog

Twitter

Section: Core Python
Type: Talks
Target Audience: Intermediate
Last Updated:

Flask ( Werkzeug ) debugger uses this approach to render traceback. Developer can go back to any point and inspect the variable. Good topic.

Werkzeug Error Image

Kracekumar Ramaraju (~kracekumar)
-1
The comment is marked as spam.

Andrewstrauss
The comment is marked as spam.

Rose Rogers (~rose)
The comment is marked as spam.

Rose Rogers (~rose)
The comment is marked as spam.

lolitalonny
The comment is marked as spam.

karanksfh22

Check comment

Kracekumar Ramaraju (~kracekumar)

Login to add a new comment.