Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Local variables not shown when in async function running in trio event loop #638

Closed
DonJayamanne opened this issue Jul 11, 2018 · 4 comments
Assignees
Milestone

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jul 11, 2018

Environment data

  • PTVSD version: Master
  • OS and version: N/A
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6
  • Using VS Code or Visual Studio:N/A

Actual behavior

Local variables not shown when in async function running in trio event loop

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

Notes:

@fabioz
Copy link
Contributor

fabioz commented Jul 11, 2018

I'll investigate this (pydev itself doesn't show it, so, should be upstream-pydevd).

@DonJayamanne
Copy link
Contributor Author

@fabioz lets leave this until we've resolved other critical issues.
I'm not too concerned about this just yet.

@fabioz
Copy link
Contributor

fabioz commented Jul 11, 2018

@DonJayamanne seems go to me... right now, this means I'll go back to #72 (note that it's already close to EOD for me, so, I'll probably only work on it next Monday).

Still, if #580/#581 is deemed important enough to have a fix (even if it means parsing python code or analysing bytecode), or there's some other critical I missed, please let me know.

@karthiknadig
Copy link
Member

Does not repro in master.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants