Debuging Django Manage.py Custom commands Pycharm
I am trying to learn how to debug a django application with PyCharm. In the application we have several custom manage.py commands. If I run there via terminal (external or Pycharm's terminal) they run fine.
If I try to run them from PyCharm (Tool -> run manage.py task) so I can debug, I get the following error:
Unknown command: 'add_question'
Type 'manage.py help' for usage.
I started working on the Django Project before using PyCharm, so I created it via django-admin, and we are adding it to pycharm as OpenDirectory->Select the project.
Any help would be helpful, be it to manage to run the command from inside PyCharm, or to connect PyCharms terminal to the debugger so that I can debug when running from PyCharms terminal.
The solution is in another answer, though a little outdated. Quick update for PyCharm 2016.3:
manage.py
in the console. Now you can run this configuration (Run > Run... > Your_configuration_name) and debug it (Run > Debug... > Your_configuration_name).
You can create a configuration for a custom command you made
Now just run/debug, selecting the configuration you just created.
for anyone still having trouble with this. Try setting up a python run configuration which is more flexible instead of django server configuration. Checkout this post
链接地址: http://www.djcxy.com/p/44944.html