how do i debug/breakpoint my django app using pycharm?

The problem has little to do with DJANGO_SETTINGS_MODULE. Pycharm sets this when creating the project. Instead Go to the little green “Play button” for running scripts. You want to configure it to run manage.py, ie you are configuring the play button to run the command python manage.py runserver.
Breakdown:

python——> run with python Intepreter

manage.py——–> run this script

runserver———> arguments

So go to the drop down to the left of the green play button

green run button ,

click on edit configurations. You will get a screen like this one

this.

Fill it out as shown locating your manage.py source script. Make sure you include runserver on the arguments box. Now you can click the green debug button and you program will stop at the first breakpoint it ecounters allowing you to descend upon it in full debug mode watch variables and all. Now you can manually type python manage.py runserver on the terminal or use your newley configured run button.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)