how to debug garden deploy command
# 🤖|ask-kapa
e
@microscopic-river-74022 how to debug garden deploy command
m
Please stand by @enough-postman-52378 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- To debug the
garden deploy
command, you can use the
bin/garden-debug
binary which adds the
--inspect
flag. This allows you to set a breakpoint in the code. Here are the steps: 1. Run the CLI with the
bin/garden-debug
binary. You might find it useful to alias this:
Copy code
bash
alias gd='/path/to/garden/bin/garden-debug'
2. Add a
debugger
statement somewhere in the code. 3. Navigate to in your Chrome browser. 4. Click the Open dedicated DevTools for Node link. 5. Run a CLI command that hits the breakpoint, e.g.:
Copy code
bash
/path/to/garden/bin/garden-debug deploy # or gd deploy, if you've set the alias
You should now be able to inspect the code at run time in the Console tab of the DevTools window. For more information, you can refer to the Garden documentation (). If you encounter any errors, you can check the logs by running the
garden logs my-deploy
command or find the logs in
.garden/deploy.debug.*.log
files. For more details, refer to the Garden logs documentation (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
e
how can I install garden-debu
m
Let me check the knowledge base for you. One moment! :books:
e
@microscopic-river-74022 how can I install garden-debug
m
---------------------- The
garden-debug
binary is not something you install separately. It's part of the Garden toolset when you install Garden. Here's how you can install Garden: For **macOS**: 1. Install Homebrew if you haven't already. Follow their installation instructions (). 2. Install Garden using Homebrew:
Copy code
bash
brew tap garden-io/garden
brew install garden-cli
To upgrade to the newest version, run
brew update
and then
brew upgrade garden-cli
. For **Linux**: You can use the installation script to install Garden automatically:
Copy code
bash
curl -sL <https://get.garden.io/install.sh> | bash
To upgrade to the latest version, simply run the script again. For **Windows**: Open PowerShell as an administrator and run:
Copy code
bash
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('<https://raw.githubusercontent.com/garden-io/garden/main/support/install.ps1'>))
To upgrade to the newest version, simply re-run the above script. After installing Garden, you can use the
garden-debug
binary for debugging. It's located in the
bin
directory of your Garden installation. You can run it directly or create an alias for convenience. For example:
Copy code
bash
alias gd='/path/to/garden/bin/garden-debug'
Then you can use
gd
as a shortcut for
garden-debug
. For more information, refer to the Garden installation guide (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
Let me check the knowledge base for you. One moment! :books:
e
@microscopic-river-74022 after following above steps for macos I get below error zsh: command not found: garden-debug
m
---------------------- The
garden-debug
binary is part of the Garden source code and is intended for use in a development environment when you're working on the Garden codebase itself. It's not included in the standard Garden installation. If you're looking to contribute to Garden or need to debug it at the source level, you'll need to clone the Garden repository and set up a developer environment. Here's how you can do it: 1. Clone the Garden repository:
Copy code
bash
git clone <https://github.com/garden-io/garden.git>
2. Follow the instructions in the Garden developer environment setup guide () to set up your environment. Once you've set up your developer environment, you should be able to find the
garden-debug
binary in the
bin
directory of the cloned Garden repository. Remember, this is only necessary if you're planning to contribute to Garden or need to debug it at the source level. For normal usage, the standard
garden
command should be sufficient. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
10 Views