Await an async function in Python debugger
Here a modified version of what I posted at https://stackoverflow.com/a/67847257/893857 since it also solves this problem. I found a solution using nest_asyncio. If one has the following async example script: import asyncio import nest_asyncio async def bar(x): return x + 1 async def foo(): import ipdb; ipdb.set_trace() if __name__==”__main__”: loop = asyncio.get_event_loop() nest_asyncio.apply(loop) loop.run_until_complete(foo()) One … Read more