I was originally looking for a way to have an open log file in VS Code update automatically as I watched it without installing an extension. I couldn't find an option to do that, and actually I think this answer works a treat.
            Asked
            
        
        
            Active
            
        
            Viewed 129 times
        
    1 Answers
0
            
            
        This answer describes how to tail a file in Powershell: https://stackoverflow.com/questions/4426442/unix-tail-equivalent-command-in-windows-powershell#:~:text=For%20completeness%20I%27ll%20mention%20that%20Powershell%203.0%20now%20has%20a%20%2DTail%20flag%20on%20Get%2DContent
The summary of that is:
Get-Content 'yourfile.log' -wait -tail 30
In order to watch it, SPLIT your Terminal window in VS Code - terminals are listed to the right of the Terminal. Hover over your current terminal session in that list, choose SPLIT and then enter the get-content tail command of your log file in the new Terminal.
 
    
    
        RobG
        
- 744
- 6
- 16
