vscode-firefox-debug
vscode-firefox-debug copied to clipboard
Support await from debug console
I can't use await
from the debug console in vscode. It shows the following error:
await 1
SyntaxError: await is only valid in async functions, async generators and modules
But this works from the debug console in firefox.
It would be really nice if we could use await expressions in vscode too, as without them it's not so easy to inspect results of async functions.
In Firefox, we transform the expression to its async-iife equivalent under the hood, so it can be evaluated. It's not something very elegant, and we're probably having issues depending on the expression, so I wouldn't try to do the same thing here. In https://bugzilla.mozilla.org/show_bug.cgi?id=1839588 we're waiting for a special mode that would be implemented in Spidermonkey in which we would have a few nice-to-have, including top-level await