Fix split debugging error in 2026.1#8877
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the project to target Java 21 and Kotlin 2.3, upgrades the IntelliJ platform version to 2026.1, and refactors debug session creation to use the modern XDebuggerManager.newSessionBuilder API. Feedback includes addressing code duplication in the build file's exclusion lists, removing dead commented-out plugin configurations, and cleaning up a placeholder token in the properties file.
| java.exclude("**/AndroidStudioGradleSyncProvider.java") | ||
| java.exclude("**/GradleUtils.java") | ||
| java.exclude("**/FlutterExternalSystemTaskNotificationListener.java") | ||
| java.exclude("**/AndroidLocationProvider.java") | ||
| java.exclude("**/FlutterStudioStartupActivity.java") | ||
| java.exclude("**/OpenAndroidModule.java") | ||
| java.exclude("**/AddToAppUtils.java") | ||
|
|
||
| kotlin.exclude("**/AndroidStudioGradleSyncProvider.java") | ||
| kotlin.exclude("**/GradleUtils.java") | ||
| kotlin.exclude("**/FlutterExternalSystemTaskNotificationListener.java") | ||
| kotlin.exclude("**/AndroidLocationProvider.java") | ||
| kotlin.exclude("**/FlutterStudioStartupActivity.java") | ||
| kotlin.exclude("**/OpenAndroidModule.java") | ||
| kotlin.exclude("**/AddToAppUtils.java") |
There was a problem hiding this comment.
[CONCERN] The list of excluded files is duplicated for both Java and Kotlin source sets. This violates the DRY (Don't Repeat Yourself) principle and increases the maintenance burden. Consider defining the list once and applying it to both source sets.
val androidStudioExcludes = listOf(
"**/AndroidStudioGradleSyncProvider.java",
"**/GradleUtils.java",
"**/FlutterExternalSystemTaskNotificationListener.java",
"**/AndroidLocationProvider.java",
"**/FlutterStudioStartupActivity.java",
"**/OpenAndroidModule.java",
"**/AddToAppUtils.java"
)
java.exclude(androidStudioExcludes)
kotlin.exclude(androidStudioExcludes)| // this doesn't seem to make a difference | ||
| // plugin("com.android.tools.idea.smali:261.22158.182") |
|
|
||
| org.gradle.caching=true | ||
| org.gradle.configuration-cache=true | ||
| token=dummy |
|
Closing in favor of #8878 |
Fixes #8831 There is an API change somewhere in 2025.3 which causes the error to be thrown during debugging. I considered making this a separate plugin branch in #8877. To test this change in IntelliJ IDEA 2026.1: - Debug an app - Debug a test - Attach an app (Run menu > Flutter Attach, then start the app on device) - I don't have a way to test bazel code. It should probably be removed.
Fixes #8831
This includes a small set of changes to use new APIs while debugging, and changes to our build files to contain these changes to 2026.1 only.
I'm inclined to make a new branch for platform version 2026.1 for this change:
XDebugSessionImpl.getRunContentDescriptor) throws an error, the alternative recommended is marked experimental (XSessionStartedResult), so I don't think it makes sense to commit this to main.Alternatively, we could use reflection to get rid of the error. I will try to push up a draft for that as well.