Is there any way to force return true here in a de...
# announcements
d
Is there any way to force return true here in a debugger?
b
Copy code
fun hello() {
  var result = false
  return result //<-- breakpoint here and then change `result` value before releasing
}
d
Thanks @Big Chungus. But the code I’m debugging is from an AAR library. I can’t modify the code.
b
Ah, then you cannot change hard-coded return. You might be able to change it upstream after it returns if it's saved in variable
d
Got it.
r
If you don't really care about what's in the method, or call it only a few times you can manually return from function. I haven't tried it myself yet, but here: https://www.jetbrains.com/help/idea/altering-the-program-s-execution-flow.html#force_return
🎉 2
👀 1
🤩 2
so you can breakpoint in the function, and then manually return
true
d
Cool, Thanks @Roukanken, I think that’s what I want.