A Java record is a class-like language feature for data-oriented types whose components are implicitly final. Records strengthen immutability in a model layer, but their values cannot be changed on the fly during debugging. section 3.3
Use records with these investigation rules:
- Expect the IDE to reject attempts to modify a record component while execution is paused. section 3.3
- If changing in-memory values is central to testing a hypothesis, inspect the data with breakpoints but use another approach for immutable values. section 3.3
Debugging an immutable model
A paused debugger can change an ordinary variable to create a new investigation case, such as replacing input with "abcd". It cannot similarly modify a record component because that component is final. section 3.3



