Open
Conversation
| }); | ||
|
|
||
| if (ref == null) { | ||
| final rootLibraryTestSuiteRef = |
Member
There was a problem hiding this comment.
@jakemac53 added you for review to look at the logic that detects the test isolate.
packages/devtools_app_shared/test/service/isolate_manager_test.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app_shared/test/service/isolate_manager_test.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app_shared/test/service/isolate_manager_test.dart
Outdated
Show resolved
Hide resolved
| _selectedIsolate.value == null || | ||
| _selectedIsolate.value == previousMain)) { | ||
| // If the previous main exited and returned (hot restart) or we were | ||
| // following the previous main, follow the newly computed main isolate. |
Member
There was a problem hiding this comment.
what do you mean by "following" in this comment?
Contributor
Author
There was a problem hiding this comment.
"Following" meant that the user had the main isolate selected (i.e., _selectedIsolate == previousMain), so when the main isolate changes (e.g. test runner → test suite), we should keep them on the new main. I've updated the comment to make that explicit: "if the selected isolate was previously the main isolate, update selection to the newly computed main isolate."
kenzieschmoll
approved these changes
Apr 9, 2026
Member
|
LGTM from me. Will wait for @bkonyi and @jakemac53 to review before landing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9747
When DevTools connects to a test run, three isolates are present: the test runner (
main), the test suite isolate where user code actually runs (test_suite:...), andvm-service. Previously, DevTools fell through to selecting the first isolate (main) as a fallback, so CPU profiling and other tools showed no data and the user's test code was running in a completely different isolate.This changes
_computeMainIsolateinIsolateManagerto prefer thetest_suite:isolate when no Flutter extension or:main(isolate is found. Thetest_suite:prefix is set as adebugNamebypackage:test_corewhen it spawns each test suite isolate, making it a reliable signal to detect test runs.Before: CPU profiler showed empty results when connected to a test run.
After: CPU profiler correctly captures samples from the test suite isolate.
Pre-launch Checklist
General checklist
///).Issues checklist
contributions-welcome] or [good-first-issue] label.contributions-welcome] or [good-first-issue] label. I understand this means my PR might take longer to be reviewed.Tests checklist
AI-tooling checklist
Feature-change checklist
release-notes-not-requiredlabel or left a comment requesting the label be added.packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.