Q:

Why can't I step into the debugger with 'dumpdata' management command?

I am trying to determine why I can't use a debugger when I call:
python manage.py dumpdata --indent=2  > forum/fixtures/initial_data.json'

I've put the following statements in the management command code:
import pdb; pdb.set_trace()
# I also tried 
import ipdb; ipdb.set_trace()

When called the command just hangs and has to be stopped with ctl-C:  
$ python manage.py dumpdata --indent=2 > forum/fixtures/initial_data.json  

^CERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid  
The error message is: ('EOF in multi-line statement', (55, 0))  
ERROR: An unexpected error occurred while tokenizing input  
The following traceback may be corrupted or invalid  
The error message is: ('EOF in multi-line statement', (101, 0))  

Why is the debugger not working?

A:

You are redirecting output to a file.
If you check contest of forum/fixtures/initial_data.json, you would see that pdb asked for an input there. If you want to debug dumpdata, do not redirect output.

