Thanks for sharing your concern.
I ran this program for about 30 mins last night. The number of entries in the output matched the frequency of printing and duration of the experiment while simultaneously running the main app with a barely noticeable lag in performance from time to time. So I have no worries about this not working, it’s just an experiment to gather data about my battery life anyway.
I think it works because my app doesn’t have much work to do, it just needs to accomplish it quickly (in terms of human perception of latency) when it has work to do. So adding prints is probably just filling in the dead time.
I imagine after 180000 prints the GC ran multiple times (right?) that would explain the occasional hiccup anyway. But I’m not sure. When I’m not using the wireless link (which i’m not in this experiment) the Debug.Print would be the only thing causing allocation.
I found out I can save the contents of the Output Window after the fact using File -> Save Output. This gets the job done but a more configurable solution using redirection or something like that is still welcome. I still have to go in and clean out lines not printed explicitly by my code.