https://kotlinlang.org logo
#android
Title
# android
k

kingsley

02/04/2018, 9:08 AM
Is there a possibility the debugger hasn’t been attached yet? You should see a checkmark (or
X
) on that red dot if everything is indeed setup properly
e

Erfan

02/04/2018, 9:49 AM
In the image the debugger the app was not running. But even when I run it with the debugger attached (all other breakpoints work as expected) doesn't stop on any line in this observable block. (although it's Log.d does log it in the console)
k

Kurt29

02/04/2018, 11:25 AM
I think the debugger has still problems with lambdas
@Erfan Can you try to make 2 logs after each other there, and set breakpoints at both lines, and see what happens?
e

Erfan

02/04/2018, 1:30 PM
@Kurt29 No difference
r

rkeazor

02/04/2018, 2:31 PM
Put the breakpoint in the line above ,and see if you can step down
if you can’t , this either your debugger isn’t attached to the right device(or at all) , or your code isn’t reaching it
Where are you actually resetting the variable?
e

Erfan

02/04/2018, 3:39 PM
@rkeazor As I said I can get the debugger to work any where outside of these observable blocks. So the debugger is attached. (I can put a breakpoint in call site of the setter and with
step into
get into the block, but the problem is that the breakpoint inside the block doesn't work) and the logs are printing to console.
d

drofwarcs

02/04/2018, 4:28 PM
I've seen similar behavior if proguard was set on debug builds or when testing with instant run enabled.
d

droidrcc

02/04/2018, 6:19 PM
AS still has problem with debug lambda and kotlin. Give them time to fix.
I would say try the same code in IntelliJ, if it works open a bug on AS, if not works on IntelliJ neither, open a bug there too.
2 Views