Deep-dive on the Next Gen Platform. Join the Webinar!

Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Developer Tools
  • Heroku VS Code Extension
  • Link Heroku Apps to Your VS Code Workspace

Link Heroku Apps to Your VS Code Workspace

Last updated March 05, 2025

Table of Contents

  • Prerequisites
  • Connecting Heroku Apps
  • Troubleshooting
  • Removing App Connections
  • Next Steps

Connect one or more Heroku apps to your VS Code workspace with the Heroku VS Code extension. You can develop linked Heroku apps locally and deploy changes directly from VS Code.

Prerequisites

Make sure you have:

  • VS Code with the Heroku extension installed
  • An authenticated Heroku session
  • One or more Heroku apps
  • A Git-initialized workspace

Connecting Heroku Apps

Connect a Single App

  1. Open the Heroku extension in the Activity Bar.

  2. Click Link workspace to Heroku app(s). Link VS Code workspace to Heroku app

  3. Select your app from the list of personal and team apps. Apps in Private Spaces have a shield icon.

  4. Click OK to confirm your selection.

The Heroku VS Code extension automatically:

  • Adds a Git remote named heroku-{app-name}.
  • Displays the app in your Heroku extension panel.

Keep your Git remotes organized by keeping the heroku-{app-name} naming convention.

Connect Multiple Apps

Use multi-select to link related apps simultaneously.

  1. Open the Heroku extension in the Activity Bar.

  2. Click Link workspace to Heroku app(s).

  3. Select the checkboxes next to multiple apps in the dropdown list. Select multiple Heroku apps

  4. Click OK to confirm your selection.

Each selected app is:

  • Added as a Git remote named using the heroku-{app-name} format
  • Listed in your Heroku extension panel

Set Up Your Workspace as a New Heroku App

  1. Open the Heroku extension panel.

  2. Click Deploy to Heroku. Deploy to Heroku option in Heroku extension

  3. Follow the prompts to create a new Heroku app.

Verify Your Connection

To confirm you linked your app correctly:

  1. Open the terminal in VS Code.

  2. Run git remote -v.

  3. Look for entries like:

    heroku-{app-name} https://git.heroku.com/{app-name}.git
    

Troubleshooting

If you encounter issues connecting your workspace to Heroku apps:

  • Verify your Heroku authentication status.
  • Confirm your workspace is Git-initialized.
  • Check your internet connection.

Error Messages

Watch the VS Code terminal for detailed error messages if:

  • The app becomes unavailable.
  • You have insufficient permissions.
  • Network issues occur.

Removing App Connections

To unlink an app:

  1. Open the terminal.

  2. Run:

    git remote remove heroku-{app-name}
    

Alternatively, right-click on the app in the Heroku Resource Explorer and select Remove app from workspace. Remove app from workspace

To verify removal, run git remote -v.

Next Steps

Continue developing linked apps by learning to manage dynos, view app logs, and monitor and manage with real-time updates in the Heroku VS Code extension.

Keep reading

  • Heroku VS Code Extension

Feedback

Log in to submit feedback.

View App Logs in VS Code Manage Dynos in VS Code

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices