If you want to log program state during debugging, use non-suspending breakpoints. Select the expression that you want to log, hold Shift, and click the gutter at the line where the expression should be logged.

In the example, sent.size() will be logged upon reaching line 24.