DevTools "Count widget builds" only works in debug mode, not in --profile mode
Steps to reproduce
- flutter run --profile --track-widget-creation
- Open DevTools → Performance
- The "Count widget builds" checkbox is greyed out.
Expected results
The flag name --track-widget-creation suggests this should still be
available in profile mode. Documentation should clarify that widget build tracking is available debug-only.
Actual results
I could not check the box to display the widget rebuilds, and the tooltip was not any help either. Documentation never mentions this. AI doesn't know.
Code sample
Code sample
[Paste your code here]
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[Paste your output here]
Documentation should clarify that widget build tracking is available debug-only.
@david78737 Which documentation are you referring here ?
The Flutter tool documentation does state that --track-widget-creation is for debug mode only:
Hi darshankawar
Thank you for getting back to me so quickly. I did not expect that.
Opening a flutter run --profile session might start like this in PowerShell
PS C:\Users\david\ondalist> flutter run --profile
Launching lib\main.dart on G54 in profile mode...
Running Gradle task 'assembleProfile'... 19.0s
√ Built build\app\outputs\flutter-apk\app-profile.apk (44.9MB)
Installing build\app\outputs\flutter-apk\app-profile.apk... 9.7s
I/flutter (14765): 🩺 Lifecycle observer attached
I/flutter (14765): 📂 DB opened safely at startup
I/flutter (14765): 🧊 Preload completed in 66 ms
I/flutter (14765): ⏱️ JANK DETECTED: 2025-11-10T13:51:53.819668: frame =
180ms
I/flutter (14765): ⏱️ JANK DETECTED: 2025-11-10T13:51:53.938475: frame =
180ms
I/flutter (14765): ⏱️ JANK DETECTED: 2025-11-10T13:51:53.938658: frame =
78ms
I/flutter (14765): ⏱️ JANK DETECTED: 2025-11-10T13:51:53.938739: frame =
47ms
Flutter run key commands.
h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).
A Dart VM Service on G54 is available at:
http://127.0.0.1:57577/LzDyliR3-fA=/
The Flutter DevTools debugger and profiler on G54 is available at:
*http://127.0.0.1:9100?uri=http://127.0.0.1:57577/LzDyliR3-fA=/
<http://127.0.0.1:9100?uri=http://127.0.0.1:57577/LzDyliR3-fA=/>
......... => opens a browser window and what I get is below.*
D/ProfileInstaller(14765): Installing profile for com.ondalist.app
I/om.ondalist.app(14765): Background concurrent mark compact GC freed
5733KB AllocSpace bytes, 2(40KB) LOS objects, 64% free, 3362KB/9506KB,
paused 143us,2.615ms total 144.816ms
[image: image.png]
I would assert that this is not really explanatory or even useful information. The provided messages (above) do not provide guidance HOW to make this tool work.
A useful tooltip might say something like this:
"The Count widget builds tool is only available in debug mode." Plain English, unambiguous, precise.
If I'm here, it should be obvious I want to count widget builds. What is lacking is information on how to do it.
Am I making sense? I spent half a day with ChatGPT trying to get this to work. If ChatGPT didn't know, it means documentation is weak.
Regards
David RIchardsn
On Mon, Nov 10, 2025 at 5:30 AM darshankawar @.***> wrote:
darshankawar left a comment (flutter/devtools#9516) https://github.com/flutter/devtools/issues/9516#issuecomment-3515142191
Documentation should clarify that widget build tracking is available debug-only.
@david78737 https://github.com/david78737 Which documentation are you referring here ? The Flutter tool documentation does state that --track-widget-creation is for debug mode only: Screenshot.2025-11-10.at.4.50.49.PM.png (view on web) https://github.com/user-attachments/assets/54abe392-7afe-4d07-874e-f1d9b13cd6cc
— Reply to this email directly, view it on GitHub https://github.com/flutter/devtools/issues/9516#issuecomment-3515142191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQFQS423WHBFOXDZ3EU2ND34BZONAVCNFSM6AAAAACLTCKUTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMJRGAZTMMBVHE . You are receiving this because you were mentioned.Message ID: @.***>
Thanks for the update @david78737
The performance -> More debugging options does show below:
I believe the Flutter tools section already has documentation that the flag --trace-widget-creation works only in debug mode. I guess the documentation and tooltip you are proposing to add would be more suitable for devtools repo, so I will transfer this issue in dedicated repo:
https://docs.flutter.dev/tools/devtools/performance#track-widget-builds