Debugging Dart in Dartium - Breakpoint keyword?
1 answer
Since Dart SDK 1.11.0 there is a function debugger
in the new dart:developer
one to trigger a breakpoint through code. You can pass an optional condition with a parameter when
and provide an optional message as well.
import 'dart:developer';
void main() {
debugger();
print('Not reached when a debugger is attached till the execution is continued');
}
If JavaScript is compiled, the keyword is used debugger
.
+4
source to share