Support debugging Flutter widget tests
See original GitHub issueIt’d be nice to get https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/commands/ide_config.dart to set up tasks.json such that when in a file that uses testWidgets
from import package:flutter_test/flutter_test.dart, it could automatically invoke flutter test
against that file and debug with breakpoints on cmd-shift-T.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:35
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Debugging Flutter apps
source-level debugger · widget inspector that displays a visual widget tree, and “widget select” mode where you select a widget in the app...
Read more >An introduction to widget testing - Flutter documentation
In the introduction to unit testing recipe, you learned how to test Dart classes using the test package. To test widget classes, you...
Read more >Debugging Flutter apps programmatically
How to enable various debugging tools from your code and at the command line. ... To dump the state of the Widgets library,...
Read more >Using the debugger - Flutter documentation
Note: The debugger works with all Flutter and Dart applications. Note: DevTools hides the Debugger tab if the app was launched from VS...
Read more >Testing Flutter apps
The more features your app has, the harder it is to test manually. Automated tests help ensure that your app performs correctly before...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, the way this works for now is:
When you hit
F5
in a flutter project, if there is noprogram
specified in yourlaunch.json
(or you don’t have one) and the active file is in thetest
folder, then it will be launched viaflutter test
. So, if you have a test file open and hitF5
it’ll run that, otherwise it’ll launch your app as usual.I’m going to create a beta release of v2.11 in the next few days and would really appreciate some testing/feedback of this as there have been some significant changes to make it work (we now control which debug adapter is used and launch it in-process, whereas it used to be controlled by Code and launched in its own process).
Thanks @DanTup for this, every useful.