[BUG] Not possible to run async functions in vscode debugger
jaltendorfer opened this issue · comments
Describe the bug
It is not possible to run async functions/methods in the debugger in vscode.
Steps To Reproduce
- Run (debug) a robot test with an async keyword and set a breakpoint in the keyword
- At the breakpoint, run a async function in the debugger (e.g.
await async_function()) - Now, the debugger is frozen and it is not possible to do anything in the debugger anymore.
Expected behavior
It should be possible to run async functions in the debugger.
Desktop (please complete the following information):
- VS Code Version 1.103.1
- RobotCode Version 1.8.0
- OS: Linux
- Python Version 3.11.13
- RobotFramework Version 7.2.2
for me this is working.
dummy.py:
import asyncio
async def mysleep():
await asyncio.sleep(1)
print("Slept for 1 second")
return "Slept for 1 second"
async def my_keyword():
print("executing async function")
result = await mysleep()
print(result)first.robot:
*** Settings ***
Library dummylib
*** Test Cases ***
first
My KeywordSet a breakpoint at the start of the my_keyword function, start the debugger an then I type
await mysleept()
into the debugger expression.
What is different to your version?
I think this is an issue of the file/class I am debugging. In other files I don't have this issue. I will close this issue.