Any way to prevent auto restart on changes when in debug? Follow
Hello! I find it annoying that when I debug something, then make a change to the code while having an active breakpoint, like change one line at most, then I alt-tab to check something, in another program on in browser. And because of that one change my code restarts(change detected), I lose my "state" that I had when I was debugging and an error occurs because I hadn't finished writing code when I alt-tabbed.
This is awesome when I'm not debugging - not having to manually restart every time. And it detects when I change windows, as to not restart amid coding. But I'd like it to not occur when there's an active breakpoint in the debug mode.
Thanks!
Please sign in to leave a comment.
Are you working on Django/Flask project by any chance? Are you referring to the automatic web server restart? If so, you can enable "no reload" option in your Django server run/debug configuration.
You can also disable all autosave options from **Preferences | Appearance & Behavior | System Settings**, and save changes explicitly when you want to restart the server.
Andrey, thanks for the reply.
The thing is yes, I'm working with these or similar framework, but I want to keep the functionality for regular non-debug runs, but avoid it for debug runs, because it endlessly pauses on error points.
Well, for Django I can only suggest using two separate run/debug configurations, one with "no reload" feature. Other frameworks should also have a similar option you can add to the additional arguments.
Yes, I'll probably just turn it off for debug. Seems there's no automatic way to do it via Pycharm, so launch params are needed. Thanks.