enough-postman-52378
08/29/2024, 4:13 PMmicroscopic-river-74022
08/29/2024, 4:13 PMmicroscopic-river-74022
08/29/2024, 4:14 PMgarden 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:
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.:
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:
----------------------microscopic-river-74022
08/29/2024, 4:14 PMenough-postman-52378
08/29/2024, 4:19 PMmicroscopic-river-74022
08/29/2024, 4:19 PMenough-postman-52378
08/29/2024, 4:19 PMmicroscopic-river-74022
08/29/2024, 4:19 PMgarden-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:
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:
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:
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:
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:
----------------------microscopic-river-74022
08/29/2024, 4:19 PMmicroscopic-river-74022
08/29/2024, 4:37 PMenough-postman-52378
08/29/2024, 4:37 PMmicroscopic-river-74022
08/29/2024, 4:37 PMgarden-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:
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:
----------------------microscopic-river-74022
08/29/2024, 4:37 PM