As a developer working with remote servers, particularly on Cloudways managed sites using VS Code’s Remote FS extension, I face unexpected SFTP connection drops. These disconnections typically happen when the connection remains idle for a while, forcing you to manually reconnect and breaking your coding flow. The file tree keeps spinning and it is very frustrating to be honest.
The Solution: Tab Keep Alive Extension
To solve this issue, I created the Tab Keep Alive Extension, a simple yet effective VS Code extension that automatically refreshes specified tabs to maintain your remote connections.
Key Features
- Configurable refresh interval
- Specify remote files to keep alive
- Start/Stop commands for manual control
- Status bar indicator with active/inactive/error states
- Detailed logging through output channel
- Error handling with automatic stop after multiple failures
How to Use It
- Installation
- Download the latest release from the GitHub Repository
- Drop the .VSIX file in the extensions tab to install.
- Configuration
- Press
CMD + Shift + P
(Mac) orCtrl + Shift + P
(Windows/Linux) - Type “Keep Alive: Configure Files and Interval”
- Set your preferred refresh interval (default is 5 seconds)
- Select remote files to keep alive from the dropdown list
- Press
- Available Commands
Keep Alive: Configure Files and Interval
– Set up which remote tabs to monitorKeep Alive: Start
– Start the keep-alive processKeep Alive: Stop
– Stop the keep-alive processKeep Alive: Toggle Status
– Toggle between start and stop states
This should be perfect for…
- Developers working with sites that have a SFTP keep alive time limit
- Remote development scenarios where connections might time out
- Teams working with remote file systems
Technical Details
The extension is built with TypeScript and integrates seamlessly with VS Code’s extension API. It’s lightweight, open-source, and available on GitHub.
Share Your Feedback
The Tab Keep Alive extension solves a real problem that many developers face when working with remote connections in VS Code. It’s especially useful for those working with Cloudways sites through Remote FS, but its applications extend to any scenario where maintaining an active connection is crucial.
Give it a try and say goodbye to those annoying SFTP disconnections. Share your experience in the comments below!