question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a way of running async code in debug console

See original GitHub issue

When running Future returning code in the debug console, only a

_Future (Instance of ‘Future<void>’)

instance is returned. And no way of interacting with it.

It doesn’t even works the .then((s){print('funcó: $s');}) call

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Jan 16, 2020

I’ve opened https://github.com/dart-lang/sdk/issues/40198 as a request to collect 👍 's on, thanks!

0reactions
HerrNiklasRaabcommented, Apr 16, 2020

I get this, when I click “Evaluate in Debug Console”:

error: org-dartlang-debug:synthetic_debug_expression:1:23: Error: ‘await’ can only be used in ‘async’ or ‘async*’ methods. popProfile.userId != (await userService.currentUser()).id ^^^^^

Just adding this phrase, so that it can be found more easily. I had a hard time finding this issue.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Do I Debug Async Code in Visual Studio?
You can access the Tasks window at Debug > Windows > Task or by using CTRL+SHIFT+D, K. Tasks window. How can I locate...
Read more >
In the VS Code "Debug Console", run a JavaScript await ...
I set a breakpoint on the async function main() { line, then I run the VS Code Debugger. I then try to run...
Read more >
How JavaScript works: debugging overview + 4 tips for ...
The first step to debugging asynchronous code is to use the console. log() function in different code sections. Use the try and catch ......
Read more >
Debug asynchronous code | IntelliJ IDEA Documentation
Press Ctrl+Alt+S to open the IDE settings and select Build | Execution | Deployment | Debugger | Async Stack Traces. · Click add...
Read more >
Debugging async operations in Node.js
The async hooks function executionAsyncId is used to retrieve the async ID of the synthesized asynchronous operation. We then run the user code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found