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.

Non-suspending breakpoint

In the example, let name = myFunction(m).firstName + " " + myFunction(m).lastName; will be logged upon reaching line 54.