Ask Your Question

debug for django-admin

asked 2021-08-10 02:39:56 -0600

skirando's avatar

updated 2021-08-10 06:26:46 -0600

I would like to run a django-admin command in debug mode.I don't know how to do it. I tried with terminal but I'm not in debug. Thank's for clues

edit retag flag offensive close merge delete


What is the command line you use outside of Wing to run that command?

Wingware Support's avatar Wingware Support  ( 2021-08-10 06:27:01 -0600 )edit

dhango-admin makemigrations myadd

skirando's avatar skirando  ( 2021-08-10 09:55:25 -0600 )edit

2 Answers

Sort by » oldest newest most voted

answered 2021-08-11 06:13:48 -0600

Chris Curvey's avatar

I have not tried it with makemigrations, but if I am trying to set a breakpoint in the django code, I've found that adding import wingdbstub at the bottom of my project seems to be a nice way of getting the debugger started.

edit flag offensive delete link more


Yes, the steps for this are described in -- it may still be easier to just launch from Wing, though, as described in the other answer.

Wingware Support's avatar Wingware Support  ( 2021-08-11 07:28:21 -0600 )edit

answered 2021-08-10 12:00:35 -0600

I think you can run the following as an equivalent to 'django-admin makemigrations myadd' on the command line:

/path1/to/python /path2/to/ makemigrations myadd

Of course you have to replace both /path1/to and /path2/to with the actual paths to those files. For Python you can see its path in the Python Shell in Wing by typing this:

import sys

Note that if you try this on the command line outside of Wing you only need the full path to Python if you're running outside of an activated environment.

Assuming that does work, you can open in Wing, right click on the editor to select Properties, and then enter the run args under the Debug/Execute tab:

makemigrations myadd

Then you can start debug for that file in Wing.

Note that you can also create and debug named entry points if you have several different command lines you want to debug. These are described in

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-08-10 02:39:56 -0600

Seen: 536 times

Last updated: Aug 11 '21