Skip to content

Latest commit

 

History

History
84 lines (62 loc) · 5.96 KB

File metadata and controls

84 lines (62 loc) · 5.96 KB

Setup

In this Getting Started section, we will walk you through the process of setting up your development environment, creating, debugging, and publishing your first extension.

Note

This guide assumes that you have already installed DevToys and DevToys CLI on your computer. It is also expected that you have some experience with C# and .NET and are familiar with the concept of dependency injection.

The setup process varies slightly depending on the operating system you are developing on. Below are the instructions for Windows, macOS, and Linux.

Setting the Environment Variable

To debug an extension seamlessly, you need to set a specific environment variable on your system. Follow these steps:

  1. Locate DevToys.exe and DevToys.CLI.exe on your computer. If you installed the app using an installer (not through the Microsoft Store), it is likely in C:\Users\[user name]\AppData\Local\Programs\DevToys\DevToys.exe. Keep this path handy for a later step.
  2. Launch a PowerShell command prompt using Windows Terminal or Windows PowerShell app.
  3. Enter the following command to define the DevToysGuiDebugEntryPoint and DevToysCliDebugEntryPoint environment variables.
    [Environment]::SetEnvironmentVariable("DevToysGuiDebugEntryPoint", "<your_path>\DevToys.exe", "User")
    [Environment]::SetEnvironmentVariable("DevToysCliDebugEntryPoint", "<your_path>\DevToys.CLI.exe", "User")
    Replace <your_path>\DevToys.exe and <your_path>\DevToys.CLI.exe with the actual path you located in Step 1.

Selecting Your Editor

We recommend you use Visual Studio 2022 for its robust development capabilities for C# and .NET. This IDE also offers a free tier. However, if you are already familiar with JetBrains Rider, it is an excellent alternative. Finally, Visual Studio Code is another option, particularly if you prefer a more lightweight text editor.

  • For Visual Studio users, please select .NET desktop development workload during installation.
  • For Visual Studio Code users, please install the C# DevKit and ResX Editor extensions.
  • For JetBrains Rider users, install .NET 8.0 if prompted.

Setting the Environment Variable

To debug an extension seamlessly, you need to set a specific environment variable on your system. Follow these steps:

  1. Locate DevToys.app and DevToys.CLI.app on your computer. It is common to find it in ~/Applications/DevToys.app. Keep this path handy for a later step.
  2. Launch the Terminal application from your Applications folder or using Spotlight search.
  3. Enter the command nano ~/.zshrc.
  4. Within the opened nano editor, append the following line at the end of the document to define the DevToysGuiDebugEntryPoint and DevToysCliDebugEntryPoint variables.
    export DevToysGuiDebugEntryPoint="<your_path_to_DevToys.app>/Contents/MacOS/DevToys"
    export DevToysCliDebugEntryPoint="<your_path_to_DevToys.CLI.app>/Contents/MacOS/DevToys.CLI"
    Replace <your_path_to_DevToys.app> with the actual path you located in Step 1.
  5. Save and exit Nano (press Ctrl+X, then confirm by pressing Y, and finally press Enter)
  6. Enter the command source ~/.zshrc in the Terminal to apply the changes you made.
  7. Restart macOS.

Selecting Your Editor

We recommend you use JetBrains Rider as it provides a full IDE experience for C#. Visual Studio Code is another option, particularly if you prefer a more lightweight text editor.

  • For Visual Studio Code users, please install the C# DevKit and ResX Editor extensions.
  • For JetBrains Rider users, install .NET 8.0 if prompted.

Setting the Environment Variable

To debug an extension seamlessly, you need to set a specific environment variable on your system. Follow these steps:

  1. Locate DevToys and DevToys.CLI programs on your computer. It is common to find it in /usr/bin/devtoys and /usr/bin/devtoys.cli. Keep this path handy for a later step.
  2. Launch the Terminal application.
  3. Enter the command nano ~/.bashrc.
  4. Within the opened nano editor, append the following line at the end of the document to define the DevToysGuiDebugEntryPoint and DevToysCliDebugEntryPoint variables.
    export DevToysGuiDebugEntryPoint="<your_path>/DevToys"
    export DevToysCliDebugEntryPoint="<your_path>/DevToys.CLI"
    Replace <your_path> with the actual path you located in Step 1.
  5. Save and exit Nano (press Ctrl+X, then confirm by pressing Y, and finally press Enter)
  6. Enter the command source ~/.bashrc in the Terminal to apply the changes you made.

Selecting Your Editor

We recommend you use JetBrains Rider as it provides a full IDE experience for C#. Visual Studio Code is another option, particularly if you prefer a more lightweight text editor.

  • For Visual Studio Code users, please install the C# DevKit and ResX Editor extensions.
  • For JetBrains Rider users, install .NET 8.0 if prompted.