Skip to content
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

Debug breakpoints in PyCharm stops working after upgrading to 0.8 or later #1313

Closed
lakaf opened this issue Sep 12, 2018 · 8 comments
Closed

Comments

@lakaf
Copy link

lakaf commented Sep 12, 2018

Hi there,

I am developing sanic application using JetBrains PyCharm (version 2018.2.3).
The breakpoint debugging function there was working fine on sanic 0.7.0, but after I upgraded to 0.8 or later all the breakpoints can never get hit any more.

@lakaf lakaf closed this as completed Sep 12, 2018
@isogram
Copy link

isogram commented Nov 7, 2018

hi @lakaf any solution for this case?

@vltr
Copy link
Member

vltr commented Nov 7, 2018

A discussion regarding auto_reload support and better IDE integration is ongoing in the community forums. The title refers to Windows, but everything is being overhauled to work seamlessly on the three major platforms (Linux, Windows and mac OS).

@lakaf
Copy link
Author

lakaf commented Nov 7, 2018

hi @lakaf any solution for this case?

Yeah as vltr mentioned this is related to auto_reload, you could set auto_reload to False in sanic's run call and this will fix this issue for now.

@isogram
Copy link

isogram commented Nov 7, 2018

thanks @vltr & @lakaf 👍

@emdotem
Copy link

emdotem commented Mar 22, 2020

Still open, can we fix it?

@Tronic
Copy link
Member

Tronic commented Mar 23, 2020

Currently the main process runs auto_reload and child processes do everything else, if auto reloader is enabled. I suppose this would require refactoring so that the main process does serving and the reloader is a child. This should be fine on POSIX platforms but I wonder if that can work on Windows, i.e. whether killing the main process would there kill all the children incl. the reloader (not sure how if Windows automatically kills child processes when the parent is killed; POSIX does not).

@charlesXu86
Copy link

Just do it as follows: Edit configrations -> Parameters : --debug=True

@charlesXu86
Copy link

image

this is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants