Debugging a custom django management command

django

Solution

There is a traceback option that does the trick :

python manage.py command_name --traceback

The command then outputs usual python errors

Problem

I can't find how to debug custom management commands. When errors happen, they just say something like : ``` IndexError: list index out of range ``` How to get more debugging info ? Like the number of the line where it crashes for instance, that would be helpful.

Original source