uriyyo/pycharm-evaluate-async-code

not working when using fastapi

1229984599 opened this issue · 7 comments

I'm really sorry, but due to my poor English, I can only use translation software.
image
When I started the FASTAPI service using the debugger method, the front-end sent the request successfully with a breakpoint, but still unable to execute asynchronous code

uriyyo commented

Hi @1229984599,

No need to sorry.

Did you try to reboot PyCharm after plugin installation?

Also, it's required to use asyncio loop, it won't work with uvloop.

uvicorn main:app --loop=asyncio
uvicorn.run(app, loop='asyncio')

@uriyyo
Still not working, the plugin is already working normally
image
The startup method has also been changed to the way you said

uvicorn.run(app='run:app', host='0.0.0.0', port=8000, reload=settings.DEBUG, loop='asyncio')
uriyyo commented

@1229984599 And what about evaluate expression window? Is it working? I am just trying to understand if is it a problem with the plugin or only with console integration.

image

Everything else is fine, except for using uvicorn to start。 @uriyyo

uriyyo commented

@1229984599 Could please try to use app config like this?
image

Thank you very much, the operation according to the method you said is indeed successful @uriyyo
image

This plugin is pretty cool

uriyyo commented

@1229984599 I would be very happy if you could leave review comment)

https://plugins.jetbrains.com/plugin/14476-evaluate-async-code/reviews