Closed artas728 closed 4 years ago
Hi @artas728,
I thought that will be a great idea to have documentation regarding how to use this plugin but as usual, I haven't enough time to do it. Sorry, my bad 😔
Basically, the only thing you should do is install a plugin in PyCharm, that's all. It will replace default PyCharm debugger with custom one which supports await
syntax in evaluate expression
and conditional breakpoints
(It will patch default asyncio
loop using nest-asyncio library in order to have ability reenter to running event loop).
I will show you a quick example, how PyCharm will behave in different cases with and without this plugin.
For instance, we have async code like this:
async def foo(n):
return n * 2
async def bar():
for i in range(10):
n = await foo(I) # At this line we have breakpoint
print(n)
After we reach a breakpoint, we will open evaluate expression
window.
Also, you can use await
syntax in Watchers
window and for conditional breakpoints
.
@artas728 If you have more questions or something isn't clear for you, feel free to ask 😊
@uriyyo , it is very clear and simple, thanks a lot for the detailed answer!
@artas728 great, I will close this issue. In case of any questions, you can reopen an issue.
Hello The question in the title, I would really appreciate an answer