How change val
property (not method variable) in debugger?
Yes, I know that val
is final analog
Breakpoint here:
Set value
disabled in context menu:
Evaluate not work:
I was able to modify val
value on the fly using "evaluate and log".
Check full answer
In the debugger select the value use the context menue on right click to select "set Value..." (default shortcut F2). The value of the variable should now be displayed in a text field. Enter the desired value and press enter to change the value. You only need to enter the value not an assignment (e.g. x = "test"
is wrong, just enter the value "test"
). The changed value is now applied to the field.
In the debugger it IS also possible to change values on immutable val
defined values in Kotlin as it is also possible to change the value on final
defined variables in Java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With