How to run adev (aiohttp_devtools) command using PyCharm
Thanks for raising the issue.
There is currently no easy way to do this.
The only solution is to create your own custom startup script that starts the server-to-server for example from aiohttp_devtools import cli; cli()
.
But I created an issue for your needs: https://github.com/aio-libs/aiohttp-devtools/issues/99
source to share
I fixed the issue above, which is referenced by Andrew # 99, and will create a new version v0.5.0
, however this does not actually fix the problem. I'll explain how to debug work below.
I use pycharm, but I avoid debugging and similar features: partly because (as in this case) they are usually not worth the effort, and partly because of when someone comes up with a decent open source or paid IDE for python. I can get away from terrible creepiness and terrible customer service without too much hassle.
Thing to keep in mind when fighting pycharm was built by java developers in a hurry, not python developers; therefore it often differs significantly from the pythonic way of doing things.
For example, in this case, the developer has clearly not heard of a python -m
"launcher as script" or a virtualenv extension env/bin
to $PATH
. Instead of setting up debug, you need to add a new file to run the CLI and link to it in the debug setting:
adev.py
:
from aiohttp_devtools.cli import cli
if __name__ == '__main__':
cli()
Then specify that to set up debugging:
This worked great for me.
source to share