Show PHP error or debug log in VS Code terminal window

Monitoring your PHP error log is a great way of tracking any errors or debug information when working on your site.

Showing the log file in the VS Code terminal window is a great way of keeping an eye on any log entries as they appear.

The tail command can be used to show the latest log entries.

In the example below I am showing the php_error.log file from MAMP, showing the last 100 entries, and any future entries (-f).

tail -f -n100 /Applications/MAMP/logs/php_error.log

Leave a Reply

Your email address will not be published. Required fields are marked *