Issue
Dart uses the build package to generate code. What if you want to debug your own Builder or an existing one?
Solution
Instead of calling pub run build_runner you can execute and debug the file build.dart which can be found here:
.dart_tool/build/entrypoint/
To enter your command like serve as in pub run build_runner serve you can edit your debug configurations:
Put the command inside the field Program arguments:
Click Apply and start debugging again. Webstorm will interrupt when a breakpoint is reached.
Answered By – HerrJohr
Answer Checked By – Mary Flores (FlutterFixes Volunteer)