How run flutter 'packages pub run build_runner build' with debug mode in intellij idea?
Ivan's answer worked for me, but every time I changed a file that was using an annotation - the build process outputted:
[SEVERE] Terminating builds due to build script update[INFO] Terminating. No further builds will be scheduled
and then renamed the build script itself from build.dart
to build.dart.cached
, and then exit with code 75.
After digging through the build_runner
code, I discovered that this behavior can be mitigated by using the following Program Arguments:
serve --skip-build-script-check
(i.e. instead of just serve
as Ivan suggested).
There may be some negative consequences; in the build_runner
source code, in options.dart
, I saw this:
// For testing only, skips the build script updates check.bool skipBuildScriptCheck;