-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoreload: Conflicts with jetbrains debugger #2243
Comments
It looks like pycharm is trying to do its own automatic reloading when you save the file by sending an interrupt signal to the original process. You don't need two kinds of reloading, so you probably want to turn off one or the other. |
Probably related. https://youtrack.jetbrains.com/issue/PY-28604
So atm it's impossible to have autoreloaded code while in debug in pycharm. |
Ah, this is just while the debugger is attached? I wouldn't expect that to work at all - reloading the process will at least break the connection to the debugger. If the debugger has a reloading feature then you may be able to use that, but I think you'll need to turn off tornado's autoreload feature to debug. I don't think there's anything we can do about this on the tornado side; it's a question for jetbrains. |
Well, it works somehow with python2, I guess there should be a chance get it working with py3 |
@Deathangel908 actually it was working for python < 3.4 :( You can check https://youtrack.jetbrains.com/issue/PY-14980, there was a workaround |
@bdarnell The behavior has changed in 2018.3 It now does
Regardless if you debug it or not
Adding |
I am having the above issue too! |
I'm using pycharm's the attache still broken, but the serve still runing and reload. |
I am currently having the same problem running py3.7. I was running intellij 2019.1 and it wouldn't work when I upgraded my application to py3 so I updated intellij ultimate to 2019.3 and it still breaks with KeyboardInterrupt only while using the debugger.
|
Faced with the same issue in PyCharm 2021 and python 3.6. Regardless debug or not after any changes the server stops with |
It is not expected that autoreload would work while a debugger is attached. If you use a debugger (I don't) you should turn off autoreload while debugging. If there's some way to detect the presence of a debugger and automatically disable autoreload while one is present, I would welcome the suggestion. Otherwise, I don't think there's anything for Tornado to do here and any questions should be directed to the debugger vendor (jetbrains, it seems, from every comment posted here). |
To reproduce the issue you can use default example:
Pycharm starts the script with
/usr/bin/python3.6 /opt/pycharm-eap/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 33261 --file file_name.py
If I edit the file and then save it I receive
This issue reproduces with
python 3.6
. Onpython 2.7
autoreload works ok. I also tried to turn offSafe write
in pycharm, but that doesn't affect it at all.The text was updated successfully, but these errors were encountered: