Data field: write debug output to log file on device

Maybe I missed it in the docs: in a data field, how do I write output for debugging purposes to a file on the actual device?

The simulator does not work for me when I try to work with training plans and still has lots of issues playing back fit files, so I would like to test on an actual device.

Thanks,

Michael