Custom run command for django_trace

I am trying to use django_trace https://github.com/saltycrane/django-trace. From a command line I can do so with
$ python manage.py trace –bad=SocketServer –calls-only runserver

If I try to make a Django Server run configuration with the custom run command
trace –bad=SocketServer –calls-only runserver
(note no quotes around that) then when I attempt to run that configuration, in the console I see
/Users/jwd/Documents/Envs/pgldev/bin/python /Applications/PyCharm.app/helpers/pydev/pydevd.py –multiproc –client 127.0.0.1 –port 49883 –file /Users/jwd/CM/PGL/manage.py "trace –bad=SocketServer –calls-only runserver" 8000
pydev debugger: process 3950 is connecting

Unknown command: 'trace –bad=SocketServer –calls-only runserver'
Type 'manage.py help' for usage.

The problem appears to be that custom run command is being surrounded with quotes before it is passed to manage.py.

Is there a way to create a custom run command that would pass the required multiple argument command string?

The immediate end goal is to create a trace record of what Django is doing under the covers when it works correctly, vs. what it doing when I get a ValueError. I am familiar with using PyCharm's debugger to trace through code execution manually. But it would be instructive to be able to create such a trace record to better understand the control flow within Django.
1 comment
Comment actions Permalink

I had the same problem too. The solution I found was to use a python run configuration which was more flexible than the django server configuration. Check it out in this post

0

Please sign in to leave a comment.