gh-121468: Support async breakpoint in pdb#132576
gh-121468: Support async breakpoint in pdb#132576gaogaotiantian merged 13 commits intopython:mainfrom
Conversation
|
Hi @iritkatriel , do you think this needs to be reviewed by asyncio expert? |
|
Yes, ideally. |
|
@kumaraditya303 I hope I can have this in 3.14 because it's a demanding feature. Could you take a look at it and see if it's a reasonable approach? Thanks! |
Lib/pdb.py
Outdated
There was a problem hiding this comment.
I think this should be run without the exception from line 891 in the context
There was a problem hiding this comment.
I restructured the code as we know whether it is an await code during compile. The nice side effect is that we don't need to execute the code under the exception context.
|
How about adding these direct links to what you added in the docs |
|
What do you mean? The link is already in whatsnew entry. |
|
@iritkatriel do you have any other concerns about this PR? |
|
Hi @iritkatriel , if you don't have any objections I'll merge this in a day or so :) |
Go for it. @kumaraditya303 has approved. |
I finally figured out how to support
awaitin pdb without too much hack - we can make the breakpoint itself an awaitable, and everything is simply integrated into the system!This PR introduced a new function
pdb.set_trace_asyncwhich the users shouldawait, and with that function, the users can do theirawaits in th debugger!📚 Documentation preview 📚: https://cpython-previews--132576.org.readthedocs.build/