summaryrefslogtreecommitdiffstats
path: root/docs/part-2/3_xds-cli/4_debug.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/part-2/3_xds-cli/4_debug.md')
-rw-r--r--docs/part-2/3_xds-cli/4_debug.md64
1 files changed, 33 insertions, 31 deletions
diff --git a/docs/part-2/3_xds-cli/4_debug.md b/docs/part-2/3_xds-cli/4_debug.md
index 38628db..e7d0775 100644
--- a/docs/part-2/3_xds-cli/4_debug.md
+++ b/docs/part-2/3_xds-cli/4_debug.md
@@ -1,38 +1,40 @@
-# Debug
+# Debugging
-Visual Studio Code launcher settings can be found into `.vscode/launch.json`.
-
->**Tricks:**
->
->To debug both `xds-cli` and `xds-agent` (REST API part) or common
-code `xds-common`, it may be useful use the same local sources.
->
->So you should replace `xds-agent` + `xds-common` in `vendor` directory by a symlink.
->
->So clone first `xds-agent` + `xds-common` sources next to `xds-cli` directory.
+## XDS cli architecture
-You should have the following tree:
+This tool is written in *Go*.
```bash
-tree -L 5 --charset=ascii src/
-src/
-`-- gerrit.automotivelinux.org
- `-- gerrit
- `-- src
- `-- xds
- |-- backup.sh
- |-- xds-agent
- |-- xds-cli
- |-- xds-common
- |-- xds-docs
- |-- xds-gdb
- `-- xds-server
+|
++-- bin/ # where xds-cli binary will be built
+|
++-- cmd-XXX.go # GO sources of each sub-commands
+|
++-- conf.d/ # Linux configuration and startup files (systemd user service)
+|
++-- glide.yaml # Go package dependency file
+|
++-- LICENSE # XDS cli license
+|
++-- main.go # main entry point (Go)
+|
++-- Makefile # makefile including
+|
++-- README.md # readme
+|
++-- scripts/ # hold various scripts used for installation
+|
++-- vendor/ # temporary directory to hold Go dependencies packages
```
-Then invoke `vendor/debug` Makefile rule to create a symlink inside vendor
-directory :
+## Debug
-```bash
-cd src/gerrit.automotivelinux.org/gerrit/src/xds/xds-cli
-make vendor/debug
-```
+Install first [Visual Studio Code](https://code.visualstudio.com/) and
+[Go plugin](https://marketplace.visualstudio.com/items?itemName=lukehoban.Go)
+(`ext install lukehoban.Go`)
+
+Visual Studio Code launcher settings can be found into `.vscode/launch.json`.
+
+Please follow instructions of xds-agent [debugging chapter](../2_xds-agent/4_debug.html#debug-xds-agent-go-code),
+knowing that you execute these same instructions in `xds-cli` repo, in other words
+by replacing *xds-agent* references by *xds-cli*.