Skip to content

await keyword support in Debug Console #951

Description

Discussed in microsoft/vscode-python#15842

Originally posted by jamesstidard April 2, 2021
It would be nice to be able to use the await keyword in the Debug Console when sitting on a breakpoint.

The asyncio module actually has a REPL that supports this in the latest versions of Python:

$ python -m asyncio
asyncio REPL 3.8.5 (default, Aug 18 2020, 11:12:18)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
>>> await asyncio.sleep(5, result="done")
'done'

If it's possible to replicate this in the Debug Console, I think this would be a very welcome feature for the python heads that live in asyncio.

If it's all part of the same system, it would also be nice to await watched variables in the Run & Debug Panel. This area:

image

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions