You can debug a custom Django admin / management command in PyCharm by creating a custom Django server entry in the Startup / Debug Settings menu:
- Click
Edit Configurations... - Click the plus sign and select
Django server . - Fill in the
Name as you like, clear the Host and Port fields, check the Custom run command and enter the name of your command in the right of the check box. - Enter any additional command line arguments in a separate
Additional options field that is not added to the run command. - Click OK.
Now set a breakpoint, select a new configuration from the Startup / Debug Settings menu, and click the Debug button. Et voilà!
Kevin Jun 28 '13 at 0:26 2013-06-28 00:26
source share