diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/main-breakpoint-hit.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/main-breakpoint-hit.png
similarity index 100%
rename from docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/main-breakpoint-hit.png
rename to docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/main-breakpoint-hit.png
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/main-with-breakpoint.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/main-with-breakpoint.png
similarity index 100%
rename from docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/main-with-breakpoint.png
rename to docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/main-with-breakpoint.png
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/version-breakpoint-hit.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/version-breakpoint-hit.png
new file mode 100644
index 0000000000..f7652b1999
Binary files /dev/null and b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/version-breakpoint-hit.png differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/version-with-breakpoint.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/version-with-breakpoint.png
new file mode 100644
index 0000000000..ce91f625a9
Binary files /dev/null and b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/version-with-breakpoint.png differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-config-selection-with-args.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-config-selection-with-args.png
new file mode 100644
index 0000000000..985f0f319c
Binary files /dev/null and b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-config-selection-with-args.png differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-config-selection.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-config-selection.png
new file mode 100644
index 0000000000..5dc8e4c13b
Binary files /dev/null and b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-config-selection.png differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-pane.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-pane.png
new file mode 100644
index 0000000000..cbccfcdcce
Binary files /dev/null and b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-pane.png differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-prompt-cmd.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-prompt-cmd.png
new file mode 100644
index 0000000000..077d36889a
Binary files /dev/null and b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-prompt-cmd.png differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-start-version-with-args.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-start-version-with-args.png
new file mode 100644
index 0000000000..41d4132362
Binary files /dev/null and b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-start-version-with-args.png differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-start.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-start.png
new file mode 100644
index 0000000000..5012724477
Binary files /dev/null and b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/img/vscode-debug-start.png differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/index.md b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/index.md
index 9669176d28..9fa9129e66 100644
--- a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/index.md
+++ b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/index.md
@@ -2,67 +2,76 @@
## Debugging your changes
-### Creating debug settings
+The following sections describe the debugging in Visual Studio Code (VS Code). If you are using another editor you can skip the following sections.
-You can debug your changes right from VS Code. It requires a small amount of set up for Go.
+>📝 **Tip** The first time you debug on **macOS** with a given version of Go you will be prompted to enter your password. It is normal for this to take 1-2 minutes for the prompt to appear the first time.
-First, open the [**Run View**](https://code.visualstudio.com/docs/editor/debugging#_run-view) in VS Code. You can do this either by clicking the icon or using the keyboard shortcut `shift+command+D` (`shift+control+d`) on Windows.
+## Predefined debug configurations
-
+You can debug your changes right from VS Code. The repository has a `.vscode` directory which contains several launch configurations containing debugging configurations. We describe the configurations in the following sections.
-At the top of the new pane you should see something like the following:
+### Debugging rad CLI
-
+This section describes the configuration named **"Debug rad CLI"**. This is a basic Go debugger configuration that is set up to launch the `rad` CLI. To try it out, set a breakpoint in `main.go`. Set the breakpoint by clicking in the *gutter* to the left of the line numbers in you editor. Place the breakpoint on the new line you added in `main.go`.
-Click on `create a launch.json file`.
+
+The debugger will stop the program prior to crossing over your breakpoint. Execute the following steps to launch the CLI in the debugger:
-This will open the file `.vscode/launch.json` in the editor. This is where VS Code stores information about different debugging configurations.
+- Open the debug pane.
-Replace the contents with the following text:
+
-```bash
-{
- "version": "0.2.0",
- "configurations": [
- {
- "name": "rad CLI",
- "type": "go",
- "request": "launch",
- "mode": "debug",
- "program": "${workspaceFolder}/cmd/rad/main.go",
- "cwd": "${workspaceFolder}",
+- Select the **"Debug rad CLI"** entry from the drop down list.
- // If you need to specify command line arguments
- // for the CLI they go here as a JSON array of strings
- "args": []
- }
- ]
-}
-```
+
-> This is a basic Go debugger configuration that is set up to launch the `rad` CLI. You can create definitions for any set of debug settings you want to keep handy.
+- Click the icon with the green triangle to launch the debugging session.
-### Running with the debugger
+
-To try it out, first you should set a breakpoint in `main.go`. The debugger will stop the program prior to crossing over your breakpoint.
+Before the debugging will start the project is build in the background. This might take some time. After the build is completed the program will start and the breakpoint should be hit.
-Set a breakpoint by clicking in the *gutter* to the left of the line numbers in you editor. Place the breakpoint on the new line you added in `main.go`.
+
-
+You can play around with the various debugger features, like stepping into code. When you're done, hit the red square *stop* icon in the debugger tools to end the debugging session.
+
+> 📝 **Tip** - You can create definitions for any set of debug settings you want to keep handy.
+
+### Debug rad CLI (prompt for args)
+
+This section describes the configuration named **"Debug rad CLI (prompt for args)"**. In contrast to the previous generic one this one uses the specific `rad CLI` commands to kick of the debugger.
+
+Let us test this setup by checking debugging the `rad version` command. The file is located at `cmd/rad/cmd/version.go`. Set a breakpoint at the beginning of the function `writeVersionString`:
+
+
+
+The debugger will stop the program prior to crossing over your breakpoint. Execute the following steps to launch the CLI command in the debugger:
-Now you can launch the CLI in the debugger. Press `F5` to launch the debugger. Alternatively, you can click the icon with the green triangle in the *run view* to launch.
+- Open the debug pane.
-After some time the program will start and the breakpoint should be hit.
+
->**macOS permissions**
-The first time you debug on macOS with a given version of Go you will be prompted to enter your password. It is normal for this to take 1-2 minutes for the prompt to appear the first time.
+- Select the **"Debug rad CLI (prompt for args)"** entry from the drop down list.
-
+
+
+- Click the icon with the green triangle to launch the debugging session.
+
+
+
+- The system will open up the command palette. Enter the command you want to debug i.e. `version` and confirm.
+
+
+
+Before the debugging will start the project is build in the background. This might take some time. After the build is completed the program will start and the breakpoint should be hit.
+
+
You can play around with the various debugger features, like stepping into code. When you're done, hit the red square *stop* icon in the debugger tools to end the debugging session.
## Next step
+
- [Run tests](../first-commit-05-running-tests/index.md)
## Related Links
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/options-in-run-view.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/options-in-run-view.png
deleted file mode 100644
index 8b0d2d1366..0000000000
Binary files a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/options-in-run-view.png and /dev/null differ
diff --git a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/run-view.png b/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/run-view.png
deleted file mode 100644
index 6bd83767d1..0000000000
Binary files a/docs/contributing/contributing-code/contributing-code-first-commit/first-commit-04-debugging-cli/run-view.png and /dev/null differ
diff --git a/docs/contributing/contributing-code/contributing-code-prerequisites/README.md b/docs/contributing/contributing-code/contributing-code-prerequisites/README.md
index 7638a75166..72cf735cf7 100644
--- a/docs/contributing/contributing-code/contributing-code-prerequisites/README.md
+++ b/docs/contributing/contributing-code/contributing-code-prerequisites/README.md
@@ -39,7 +39,7 @@ The best way to launch VS Code for Go is to do *File* -> *Open Folder* on the re
You can easily do this from the command shell with `code .`, which opens the current directory as a folder in VS Code.
-## Tool Overview
+## Tool overview
Contributing to Project Radius requires several tools to get started. This section lists them grouped by their context
@@ -49,7 +49,7 @@ Contributing to Project Radius requires several tools to get started. This secti
Note: some of this content is synchronized with the first-commit guide for simplicity. Keep these in sync!
-->
-### Required Tools
+### Required tools
This is the list of core dependencies to install for the most common tasks. In general we expect all contributors to have all of these tools present:
@@ -63,7 +63,7 @@ This is the list of core dependencies to install for the most common tasks. In g
To build our containers, you also need [Docker](https://docs.docker.com/engine/install/).
-### Additional Tools
+### Additional tools
The following tools are required depending on the task at hand.
@@ -75,7 +75,7 @@ The easiest way to run Radius is on Kubernetes. To do this you will need the abi
- [Install Helm](https://helm.sh/docs/intro/install/)
- [Install Kind](https://kubernetes.io/docs/tasks/tools/#kind)
-#### Troubleshooting Kubernetes
+#### Troubleshooting kubernetes
You might want tools that can help debug Kubernetes problems and understand what's going on in the cluster. Here are some recommendations from the team:
@@ -95,7 +95,7 @@ The default `go test` output can be hard to read when you have many tests. We re
- [gotestsum](https://github.com/gotestyourself/gotestsum#install)
-## Development Environment - Setup Options
+## Development environment - setup options
The following sections describe the aforementioned alternatives of development setups in more detail.
@@ -108,7 +108,7 @@ The steps to execute are:
1. Press this button[](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=340522752&skip_quickstart=true&machine=basicLinux32gb&devcontainer_path=.devcontainer%2Fcontributor%2Fdevcontainer.json&geo=UsWest)
1. There is no second step - you are ready to contribute 😎
-> **Note** - When using GitHub Codespoces cost can occur on your side after you have used up the monthly included storage and core hours for your account. You find more details [here](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces).
+> **Note** - When using GitHub Codespaces cost can occur on your side after you have used up the monthly included storage and core hours for your account. You find more details [here](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces).
### VS Code and Dev Container
@@ -136,7 +136,7 @@ Once the container is up and running you can start with your contribution.
> 📝 **Tip** - You find more information about developing inside a container [here](https://code.visualstudio.com/docs/devcontainers/containers)
-### Local Installation
+### Local installation
to have all prerequisites installed locally you must install the tools mentioned in the sections [Tool Overview - Required Tools](#required-tools) and [Tool Overview - Additional Tools](#additional-tools) on your local machine.
@@ -161,7 +161,7 @@ Using Homebrew:
brew install make
```
-## Testing Required Tools
+## Testing required tools
Independent of the setup option you have chosen, you can now test your tooling. If not already done, navigate to the cloned project in your command shell and build the main outputs using `make`:
@@ -171,7 +171,7 @@ make build && make lint
Running these steps will run our build and lint steps and verify that the tools are installed correctly. If you get stuck or suspect something is not working in these instructions please [open an issue](https://github.com/radius-project/radius/issues/new/choose).
-### Code Generation
+### Code generation
Our code generation targets are used to update generated OpenAPI specs and generated Go code based on those OpenAPI specs. Additionally, some Go code is generated mocks or Kubernetes API types.