classification
Title: Add support to async code to pdb
Type: enhancement Stage:
Components: asyncio Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, hack.augusto, yselivanov
Priority: normal Keywords:

Created on 2020-10-15 15:24 by hack.augusto, last changed 2020-10-15 15:24 by hack.augusto.

Messages (1)
msg378687 - (view) Author: Augusto Hack (hack.augusto) * Date: 2020-10-15 15:24
Currently it seems that `pdb` does not support executing `async` functions. This makes debugging `async` code a bit harder if one needs to call an `async` function from the REPL.

Here is an example:

```python
import asyncio

async def f() -> int:
    return 1

async def main():
    breakpoint()

asyncio.run(main())
```

The goal would be to call `f()`. In a real world application this could be additional HTTP requests, database queries, etc.
History
Date User Action Args
2020-10-15 15:24:26hack.augustocreate