This does a full cross-package version solve for the entire repository. Run flutter update-packages -force-upgrade to resynchronize all the pubspec.yaml files. Once you've edited a pubspec.yaml file in the Flutter repository to change a package's dependencies, Adding, removing, or making changes to Dart dependencies Though those steps given above are under Android Studio, the logic also works for other IDEs. If you make some changes to the flutter_tools package, you may need to do as 'Making changes to the flutter tool' says above because flutter command might be triggered implicitly by gradle, etc. The dart sdk is used to run the bin/flutter_tools.dart and expected to configure as below:ĭ. Working directory is which flutter project you want to run the flutter command, and is not always necessary.Ĭ. Program arguments refers to the arguments for flutter command, it's passed to main method directly. The Dart file refers to bin/flutter_tools.dart where the main function is located. Create a new Dart Command Line App by Add Configurations and configure it as below: Open the flutter_tools package in Android Studioī. You can debug it following the steps below:Ī. Let's take flutter doctor -vv as an example. That's to say, you can debug flutter command as a Dart Command Line App. The flutter command is just a wrapper and it will finally run $FLUTTER_ROOT/bin/cache/flutter_tools.snapshot generated by flutter_tools package. However, there are some cases in which you may find it useful to debug flutter commands, especially when it's difficult to reproduce your issue. Debugging the flutter command-line tool in Android Studioĭevelopers are expected to be able to run flutter commands without needing in-depth knowledge of the tool. With this configured, set a breakpoint(s) inline in a source file, and start debugging from the menu with Run -> Start Debugging.įor more on debugging, including detailed information on launch.json, in VS Code refer to the VS Code documentation. To run dart analysis on the Flutter tool codebase, run:Īlso, ensure flutter_tools (flutter) is selected on the Debug tab. Markdown documentation can be found for some commands in flutter/packages/flutter_tools/doc/. To the Flutter SDK controlled flutter and dart binaries. On your path resolves to another binary, you should either prepend the Flutter SDKīin dir to the front of your $PATH, or ensure each invocation uses the path To the scripts inside /path/to/flutter/bin. The rest of this document assumes that flutter and dart on your path resolve You run git pull -rebase (or flutter upgrade, or anything that changes the current commit). The flutter tool itself is built when you run flutter for the first time and each time When contributing to Flutter, use git pull -rebase or git rebase upstream/main
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |