Skip to content

Debugger doesn't show local variables in async function running in trio event loop #2093

@andersea

Description

@andersea

Environment data

  • VS Code version: 1.24.1
  • Extension version (available under the Extensions sidebar): 2018.6.0 (20 June 2018)
  • OS and version: Kubuntu 17.10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv
  • Relevant/affected Python packages and their versions: trio 0.4.0

Actual behavior

When running an async function on the Trio event loop, and when stopping on a breakpoint inside the async function, local variables are not shown.

billede

Expected behavior

In the example, local variables should show sleep_time: 5

Steps to reproduce:

import trio

async def main():
    sleep_time = 5
    # set breakpoint below
    print('Going to sleep')
    await trio.sleep(sleep_time)
    print('Woke up')

some_text = 'Hi!'

trio.run(main)

print(some_text)

Logs

Output of Terminal pane:

andersa@Kubuntu-N73JF:~/python/async_debugging_experimental$ cd /home/andersa/python/async_debugging_experimental ; env "PYTHONIOENCODING=UTF-8" "PYTHONUNBUFFERED=1" "PYTHONPATH=/home/andersa/.vscode/extensions/ms-python.python-2018.6.0/pythonFiles/experimental/ptvsd" /home/andersa/.local/share/virtualenvs/async_debugging_experimental-zTVpGFmI/bin/python -m ptvsd --host localhost --port 38433 /home/andersa/python/async_debugging_experimental/test.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions