Search code examples
dartdart-async

How do I debug a command-line Dart app that uses async? (breakpoints not working)


The debugger in IntelliJ or the Dart Editor won't stop at the breakpoint for this code:

main() async {
    var x = 1;
    bool stop = true; // breakpoint here
}

... but does for this code:

main() {
    var x = 1;
    bool stop = true; // breakpoint here
}

Dart SDK 1.8.3 and latest stable releases on both IDEs.


Solution

  • This is a known issue that is fixed in the dev channel and will be released in the 1.9 stable channel. See Breakpoint set inside of async function does not trigger.