You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set breakpoint at MainActivity line 27 (Snackbar#make()) within the lambda
Set app's build.gradle to retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.4.0' (should already be set to this on master)
gradlew clean assemble --refresh-dependencies
perform gradle sync
debug app
Results: MainActivity.this IS accessible from debugger
Change app's build.gradle to retrolambdaConfig 2.5.0
gradlew clean assemble --refresh-dependencies
perform gradle sync
debug app on same emulator/device
Results: MainActivity.this IS NOT accessible from debugger
Change app's build.gradle back to retrolambdaConfig 2.4.0
gradlew clean assemble --refresh-dependencies
perform gradle sync
debug app on same emulator/device
Results: MainActivity.this IS accessible from debugger again
Notes:
Setting any breakpoints outside the lambda behaves as expected.
When setting a breakpoint within this lambda, the debugger cannot access the MainActivity instance, its member variables, or instance methods. This is true within Android Studio's Variables window, Watches window, and Evaluate Expression window.
MainActivity.this is always accessible within the lambda from the code itself; just not during debugging
If I change the reference to MainActivity.this to reference the isAccessibleFromLambda member variable instead, I get the same behavior with the above steps.
If I remove any reference to the enclosing class file's instance from within the lambda, then even on retrolambda:2.4.0 I still can't access MainActivity.this within the debugger at that breakpoint. I'd still prefer to be able to have access to the enclosing class file's instance in that case, but I'm not sure what the expected behavior is in that case based on how retrolambda works.
The same behavior was exhibited with older versions of gradle-retrolambda. Originally I observed the different behavior between gradle-retrolambda:3.4.0 and gradle-retrolambda:3.5.0, but I believe I've traced that back to the default version of retrolambda that gets pulled in by those versions of gradle-retrolambda. The differentiating factor appears to be the version of the retrolambda dependency that gets pulled in.
The text was updated successfully, but these errors were encountered:
Test Project:
https://github.com/hustoj2/RetrolambdaDebuggerReducedTestCase
Environment:
Android Studio 2.3.1
Build #AI-162.3871768, built on April 1, 2017
JRE: 1.8.0_112-release-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
gradle-retrolambda 3.6.0 (the version of gradle-retrolambda doesn't appear to matter)
retrolambda versions affected
Test Steps:
Notes:
The text was updated successfully, but these errors were encountered: