Reputation: 87
I'm working on a SpringBoot like service, and using IntelliJ idea. There are some objects that are instantiated at service startup and undergo numerous method calls in multiple classes throughout the lifecycle of each API call.
With IntelliJ's debugging features, I can watch such a variable at any breakpoint, but is there a way to follow a variable's journey as it's passed around and watch all state mutations and method calls happening to it?
Upvotes: 6
Views: 9716
Reputation: 327
You can use Make Object ID to track the object values.
Or use data breakpoint to monitor the variable changes.
Upvotes: 1
Reputation: 2674
You can try using field watchpoints, see https://www.jetbrains.com/help/idea/using-breakpoints.html. It allows to stop where the field is accessed and/or modified:
Upvotes: 6