Temporarily turn off autosave while debugging in Django?
I keep having the issue where I'm debugging a Django application, and the IDE's auto save triggers the Django server's auto reload functionality. This causes me to lose my current debug session, costing a great deal of time that I have spent stepping through the code that I'm trying to fix.
I know that the editor will autosave, and I want that feature. I also want Django to reload on changes on save. However even simply clicking on the debugger itself after making a change will trigger the auto save and auto reload.
I've looked around at this and my apparent choices are:
- turn off all of the auto save features of PyCharm in the settings dialog. This isn't a good option, because I want it on most of the time. Also, I can't do this temporarily (while in the middle of a debug session), because opening the settings triggers an auto-save.
- turn off auto-reload in Django. This also isn't a good option, because 90% of the time I want auto reload in django while debugging. The trouble is when I know I don't want it, there's no way to temporarily turn it of that preserves my current debugging state.
Ideally, I'd like a to have a button to temporarily turn off autosave in the debugger, and have it turn back on when the debugger stopped. Less ideally, I'd like autosave always be disabled while the debugger is running.
Are there any other options that I'm missing?
请先登录再写评论。
Hi @... , may I ask you to provide screenshots / screen-cast demonstrating this behavior?
For better understanding of the issue, please also provide the following:
- Screenshot of File | Settings | Appearance & Behavior | System Settings
- Screenshot of File | Settings | Tools | Actions on Save
- Screenshot of File | Settings | Tools | Web Browsers and Preview
- Logs from Help | Collect Logs and Diagnostic Data after reproducing the issue. Please upload it to https://uploads.services.jetbrains.com and let me know the upload ID.