Status Update
Comments
mo...@gmail.com <mo...@gmail.com> #2
I don't think you need my log files for this issue but let me know if you do.
ad...@google.com <ad...@google.com>
sa...@google.com <sa...@google.com> #3
Alon, it this a known debugger issue with kotlin?
aa...@google.com <aa...@google.com> #4
It's new to me.
aa...@google.com <aa...@google.com> #5
I can check if it happens on Compose Desktop
aa...@google.com <aa...@google.com> #6
I think NavHost is a Android construct which doesn't apply to Compose desktop.
That said, I can't repro the bug on my test app.
See screenshot.
Can you attach a complete sample app that this happens in?
mo...@gmail.com <mo...@gmail.com> #7
Your screenshot shows that you broke on the line "composable(...)" and that is not what meant and I apologize for not being clear. Please put your breakpoint on the println("") instead (that is what I was referring to as the first line). Then it won't break.
aa...@google.com <aa...@google.com> #8
OK, I can repro now.
aa...@google.com <aa...@google.com> #9
I suspect it's a Compose Compiler issue.
al...@google.com <al...@google.com>
aa...@google.com <aa...@google.com> #10
Andrei, have you had a chance to look at this issue? And
as...@google.com <as...@google.com> #11
Yes, I briefly investigated, but could not isolate in our debugger tests. It seems like
mo...@gmail.com <mo...@gmail.com> #12
This is not fixed. You have this same issue in other places, (at least in LadyBug). For example, now I can't stop on the println in this main activity OnCreate function which is very annoying because it makes the developer think that some other route leads to their MainScreen composable. This just wasted 2 more hours of my time. This is serious because clearly if it's a problem in 2 of the places I've now shown you, it's likely in other areas too. So please address this so that I don't waste hours wondering why my code is not being executed when it is being executed but just now allowing me to trace it because of this bug.
@OptIn(ExperimentalMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
val navController = rememberNavController()
var showSplash by remember { mutableStateOf(true) }
val fadeDurationMillis = 1000
AppTheme {
Surface(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.background)
) {
CameraScreenWrapper()
AnimatedVisibility(
visible = showSplash,
enter = fadeIn(tween(fadeDurationMillis)),
exit = fadeOut(tween(fadeDurationMillis))
) {
SplashScreen(onAnimationEnd = { showSplash = false })
}
// Main Screen (with TextureView in Camera)
AnimatedVisibility(
visible = !showSplash,
enter = fadeIn(tween(fadeDurationMillis)),
exit = fadeOut(tween(fadeDurationMillis))
) {
println("Debugger will not break on this line.")
MainScreen(navController = navController)
}
}
}
}
}
mo...@gmail.com <mo...@gmail.com> #14
Thanks!
Description
If you set a breakpoint on the first line of any NavHost compose block statement, for example on the println below
```
composable("main") {
println("MainScreen")
MainScreen(navController)
}
```
then the debugger will not stop on that line when debugging the app. It will stop on MainScreen(navController) if you set a breakpoint on that line (or any subsequent lines).
This is a pain because you can waste a long time figuring out why your app is not stopping on the line you want it to.
```
Build: AI-233.14808.21.2331.11842104, 202405142049
AI-233.14808.21.2331.11842104, JRE 17.0.10+0-17.0.10b1087.21-11572160x64 JetBrains s.r.o., OS Linux(amd64) v6.5.0-35-generic, screens 3440.0x1440.0
AS: Jellyfish | 2023.3.1 Patch 1
Kotlin plugin: 233.14808.21.2331.11842104-AS
Android Gradle Plugin: 8.4.1
Gradle: 8.6
Gradle JDK: JetBrains Runtime version 17.0.10
NDK: from local.properties: (not specified), latest from SDK: (not found)
CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
Source: send_feedback_icon```