SOLVED: Can't debug Django template. Please help
Hello! I'm new with Django and Pycharm. I found both products awesome and until now everything has run without a problem, but now I need to debug my code, specially my Django templates.
I have tried but the debugger doesn't stop at my breakpoints.
This is what I have done:
- I have successfully add breakpoints to my template code (into for sentence)
- I have created a new debug configuration based on "Django server default". My host is 127.0.0.1:8000 and it opens the browser (Firefox 53) showing the template I want to debug. I haven't change any of the other fields.
- Before debuggging I have selected the debug configuration I created.
- Hit the debug icon.
The browser open at my template page but nothing happens. It doesn't stop at the breakpoint.
My PyCharm setting say that my built-in server port for debugging is 63342. In Firefox I have activated the remote configuration option and I'm listening to port 63342.
Don't know what else to do.
I don't want to use Chrome since I have RAM limitations.
This is my working environment:
Windows 10 32 bits
PyCharm 2017.1.3 .. Professional edition
Django 1.10.7
Python 3.5.1
I have read a post saying that it was solved deleting .idea folder ... but I don't know to do it since I don't knwo the usage of that folder and the consequences it might have. Plus, the post was from 2011 I guess.
Cheers!
请先登录再写评论。
SOLVED: It seems all steps I did were correct. The problem was becuase I was running the server locally and didn't stop it. So when I called the debugger a new server instance was created. When I stopped the web server I created first and called the dubber again it worked.
Also I closed my Firefox and re open again. That might have helped as well.
Regards!!