This page shows you how to install and run
[Functions Frameworks](https://docs.cloud.google.com/functions/docs/functions-framework) for local
development.

## Before you begin

If this is your first time using [Cloud Run functions](https://docs.cloud.google.com/run/docs/functions-with-run)
with Cloud Code, see the
[Get started with Cloud Run functions](https://docs.cloud.google.com/functions/docs/get-started-in-cloud-run)
quickstart. Once you've created and deployed a function using a
Cloud Code sample, you can return to this guide to setup a local
development environment.

## Install and run Functions Framework locally

To install and run Functions Framework locally, follow these steps:

1. In VS Code, click
   ![](https://docs.cloud.google.com/static/code/images/cloud-code-icon.svg)
   **Cloud Code** and then expand the **Cloud Functions** explorer.

2. Expand your Google Cloud project, right-click a deployed function of
   your choice, and select **Download to new workspace**. This downloads the source
   code of your function from Google Cloud to your local machine and
   creates a new workspace in your IDE.

3. Click **View** \> **Terminal**
   to open the terminal in VS Code.

4. To install the local dependencies to your function's local folder, navigate
   to your function's local folder in the terminal and then run the following:

   ### Node.js

       npm install

   ### Python

       pip install functions-framework

5. To run the local Functions Framework, run the following:

   ### Node.js

   ```bash
   npx functions-framework --target=entryPoint
   ```

   ### Python

   ```bash
   functions-framework --target=entryPoint
   ```

   To find the `entryPoint` of your function, open your `launch.json` file and
   look for the assigned value of `entryPoint`.

   For example, if you're using Cloud Code's Hello World sample
   application, the configuration appears as follows:

       "entryPoint": "helloHttp",

6. To test your function, when prompted, click **Open in Browser** , or click
   **+ New Terminal** and run the following:

         curl http://localhost:8080/

   > [!NOTE]
   > **Note:** By default, your function will be accessible at `localhost:8080`.

   This shows the context of the function in the terminal.

For more information on how to call locally running functions, see
[Local functions development](https://docs.cloud.google.com/run/docs/local-dev-functions).

## Get Support

To send feedback, ask a question on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=cloud-code-vscode). If you are a Google Cloud customer, you can file tickets through [standard Google Cloud
support channels](https://cloud.google.com/support?e=48754805).