HOME BLOG

How to view stack trace on app crash when running Django management commands

Posted on: July 19th, 2021 by Olu No Comments

Hi folks,

In this post I describe how to view stack trace on app crash when running Django management commands. When using older versions of Django, if you run a management command and it crashes, you may notice that only the error message is displayed. It would be helpful to see a stack trace as well to facilitate debugging. Thankfully, it’s easy to enable stack trace display.

To view stack trace on error when running Django management command, use the –traceback option. E.g.

 

python manage.py some-command --traceback

 

That’s all for now. Happy software development.

Leave a Reply