View App Logs in VS Code
Last updated March 05, 2025
Table of Contents
App logs are available in the Heroku VS Code extension. Use logs to debug and track the performance of your Heroku apps.
Prerequisites
- VS Code with the Heroku extension installed
- An authenticated Heroku session
- At least one running Heroku application
Stream App Logs in VS Code
You can stream logs with the apps explorer or with the quick action button. The log buffer retrieves the last 100 lines if available. If network issues occur, the extension automatically attempts to reconnect.
Stream Logs with the Apps Explorer
- Open the Heroku extension in the Activity Bar.
- Right-click on the app in the
Heroku Resource Explorer
. - Select
Start log session
.
Stream Logs with the Quick Action Button
- Open the Heroku extension in the Activity Bar.
- Click the
Start log session
icon next to the app in theHeroku Resource Explorer
.
Understanding the Log Stream
When you start a log session, the Output panel displays:
- A confirmation message:
Log session started for {app-name}
. - Real-time log entries, including:
- Timestamps
- Log levels
- Source identifiers
- Message content
Manage Log Sessions
You can pause, resume, or end log sessions as needed.
Pause and Resume Log Sessions
To pause a log session:
- Right-click on the app in the
Heroku Resource Explorer
. - Select
End log session
.
To resume streaming logs, start a new log session.
End a Log Session
To stop a log stream:
- Right-click on the app in the
Heroku Resource Explorer
. - Select
End log session
.
Alternatively, you can hover over the app name in the Heroku Resource Explorer
and select the debug-disconnect icon.
Troubleshooting Log Sessions
If you encounter issues logging:
- Check your network connection.
- Verify your Heroku authentication status.
- Ensure your application is running.
- Try pausing and restarting the log session.