1

await expression in the debug shell

  • retag add tags

async def remove_author(id: UUID) -> Author:

             async with repository_factory() as repo:

                 obj = await repo.delete(id) #--step

I use wing pro to debug a async function, when I in the break point, I cannot run "await repo.delete(id)" in the debug shell, it prompt me "'await' outside function: "

but pycharm can support await and get obj a user object correctly. Is wingware support await in shell? Or I miss some configs in the settings?

bai's avatar
113
bai
asked 2025-08-08 03:57:30 -0500, updated 2025-08-08 03:59:43 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

I can inspect obj if I check "Debug Child processes", but still can eval await expression I found another solution, use python -m asyncio can use await in the shell, maybe it can be used in wingware debug shell.

bai's avatar
113
bai
answered 2025-08-08 04:11:19 -0500, updated 2025-08-08 05:05:43 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer