Closed ramast closed 5 years ago
Thanks for the help. Sorry to comment on a closed issue but can you explain why the noreload switch makes it work?
Basically ./manage.py starts a separate process to run your code into while it monitor the code for any changes. when a change is detected, it restart that separate process.
line_profiler has no access to that separate process and can't inject it's code in it.
When adding --no-reload, manage.py will no longer need to monitor anything and will run your code directly in same process and that's why it works.
That's my understanding anyway, could be wrong
When running
I get the exception
Inspired by this, I've solved the problem by running Django server like that
works flawlessly now. Creating that issue in case someone else encountered this problem.