# Running from Source

## Introduction

Gum is an open source project so you can run it from source instead of running the pre-compiled project. Running from source is not a requirement, and is only needed if you intend to contribute to Gum or if you'd like to diagnose problems in a debugger.

## Obtaining the source code

1. Download the source file from [GitHub](https://github.com/vchelaru/gum)
   1. If you downloaded the .zip file from the GitHub main page, unzip the file
   2. If you downloaded the file through a Git client, be sure to be on the `main` branch

<figure><img src="/files/ui5P6RpeDYDbyBrmehT1" alt=""><figcaption><p>Gum repository in Github Desktop</p></figcaption></figure>

## Running the code

1. Locate the Gum.sln file
   1. If you downloaded the .zip, it is in the root folder of the zip
   2. If you cloned the repository, it is at the root of the Gum folder
2. Double-click it to open Visual Studio, or open Visual Studio and load the .sln
3. Be sure to build solution rather than pressing F5 (which only builds the current project). This guarantees that all plugins are built and copied correctly. For more information see below.

Once the project has been built, you can run (with or without a debugger attached).

### Building Plugins

Gum depends on a number of plugins for its functionality. By default if you build the project and run it (such as by pressing F5 in Visual Studio), then plugins are not automatically built. To build plugins, you need to explicitly build all plugin projects. The easiest way to do this is to select the Build -> Rebuild Solution option in Visual Studio.

<figure><img src="/files/oH8QggUDFFX2RYPV8ZCV" alt=""><figcaption><p>Build -> Rebuild Solution in Visual Studio</p></figcaption></figure>

## Troubleshooting

### Missing Editor Tab

If your Editor Tab is missing, be sure to Build -> Build Solution. The Editor tab is a plugin, and you can verify that the plugin is in fact being built/loaded.

First view plugins:

<figure><img src="/files/AVHii8F4pH0f5aX89fqh" alt=""><figcaption></figcaption></figure>

Next, look for the Editor tab plugin in the list that appears:

<figure><img src="/files/gOxPXRiW0he4qlkkFqDm" alt=""><figcaption></figcaption></figure>

If you are missing this, be sure to Build -> Build Solution.

### A project with an Output Type of Class Library cannot be started directly

<figure><img src="/files/lcN46S4yivD3ESD86gas" alt=""><figcaption></figcaption></figure>

If you have this popup, you need to set Gum as the startup project.

In Visual Studio:

1. Right-click on the **Gum** project (not the solution)
2. Select **Set as Startup Project**

<figure><img src="/files/VxVEdCmM5MufvkN5OCtH" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flatredball.com/gum/gum-tool/setup/running-from-source.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
