Rolling logs with PowerShell Link to heading

I saw a video once on YouTube where the presenter had a PowerShell window open with rolling logs from a log file. I don’t remember which video was that, or who was the presenter, but I have saved and tweaked their code.

Usage Link to heading

We can just simply start the debugger console using dbps thanks to the alias.

And write logs into the log file like this "Hello PowerShell" >> $DebugLog and it will show up in the debugger window.