Debugging Dart in Dartium - Breakpoint Keyword? [duplicate] Debugging Dart in Dartium - Breakpoint Keyword? [duplicate] dart dart

Debugging Dart in Dartium - Breakpoint Keyword? [duplicate]


Since Dart SDK 1.11.0 there is a debugger function in the new dart:developer library to trigger a breakpoint via code. You can pass an optional condition with the when parameter and provide and optional message.

import 'dart:developer';void main() {  debugger();  print('Not reached when a debugger is attached till the execution is continued');}

If compiled to JavaScript, the debugger keyword is used.