smalidea
smalidea copied to clipboard
evaluate and log in breakpoint logs value only from first evaluation
My software setup:
Android Studio Bumblebee | 2021.1.1 Patch 1 Build #AI-211.7628.21.2111.8139111, built on February 1, 2022 Runtime version: 11.0.11+9-b60-7590822 amd64 VM: OpenJDK 64-Bit Server VM by Oracle Corporation Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 8 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: com.github.beansoft.jadx.gui.idea (2021.2.1), org.jf.smalidea (0.06-dev), PythonCore (211.7628.24), org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40)
My problem
For debugged method below evaluate and log output is same for all calls.
Breakpoint configuration

Debugged method
.method public static a(I)I
.registers 2
.line 108
sget-object v0, Lcom/badlogic/gdx/math/MathUtils;->a:Ljava/util/Random;
add-int/lit8 p0, p0, 0x1
invoke-virtual {v0, p0}, Ljava/util/Random;->nextInt(I)I #breakpoint evaluating p0
move-result p0
return p0 #breakpoint evaluating p0
.end method
Output:
random 3
random_result 1
random 3
random_result 1
random 3
random_result 1
random 3
random_result 1
In watches I can see value correctly changing with each call.
Watches values:
