I want to put break point on my generator code, but I don't know how to run the command on the debug mode.
I wrote generator using source_gen
and build_runner
class MyGenerator extends GeneratorForAnnotation<Todo> {
@override
FutureOr<String> generateForAnnotatedElement(
Element element, ConstantReader annotation, BuildStep buildStep) {
return "// Hey! Annotation found!";
}
}
run commad flutter packages pub run build_runner build
*
copy build.dart
to root folder of project
* the packages
is optional, you can just run flutter pub run build_runner build
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With